|
sunnyram wrote: fatal error LNK1112: module machine type IA64 conflicts with target machine X86
You are (somehow) linking to the Itanium (IA64) libraries - have a look in your directory settings and get rid of any 64-bit directories!
sunnyram wrote: cl: Command line warning D4007: '/Gm' requires '/Zi' option ignored.
That says that you've somewhere got the /Gm option (Enable minimal rebuilds) set - you need to set /Zi (Enable debugging information) as well.
sunnyram wrote: cl: Command line warning D4002: ignoring unknown option '/ZI'.
/ZI = "enable Edit and Continue".
sunnyram wrote: cl: Command line warning D4002: ignoring unknown option '/GZ'.
/GZ = "Catch release-build errors in debug build".
All those options are in VC6 (as well as all VC++ compilers up to and including 2008)... what C++ compiler are you using?
|
|
|
|
|
Thanks again Stuart,
I am using VC++ 6.0 compiler.
from following web site ,
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
i downloaded the Windows Server 2003 PSDK and installed it.
Now i want to use the new libraries and include files of these installed sdk with
my VC++6.0 project.
so in VC==6.0 project, in Tools->Options and in Directories Tab, i changed Library files reference as
'C:\Program Files\Microsoft SDK\Lib'
and also made changes in Include Files section like
'C:\Program Files\Microsoft SDK\include'
'C:\Program Files\Microsoft SDK\include\mfc'
'C:\Program Files\Microsoft SDK\include\Win64\mfc'
'C:\Program Files\Microsoft SDK\include\Win64\crt'
'C:\Program Files\Microsoft SDK\include\Win64\atl'
and then with these changes i rebuilt my project and i am getting the linker error
as follows:
fatal error LNK1112: module machine type 'IA64' conflicts with target machine type 'X86'
so how do i fix this problem?
waiting for reply.
abc_123
|
|
|
|
|
You don't want those Win64 header directories in your include directory list.
|
|
|
|
|
first Thanks for reply.
I removed the Win64 entries
'C:\Program Files\Microsoft SDK\include\Win64\mfc'
'C:\Program Files\Microsoft SDK\include\Win64\crt'
'C:\Program Files\Microsoft SDK\include\Win64\atl'
and now my Include File section contains the following things:
'C:\Program Files\Microsoft SDK\include'
'C:\Program Files\Microsoft SDK\include\mfc'
I rebuilt my VC++6.0 project
and now i am getting the following error:
fatal error RC1015: can not open include file 'afxres.h'
abc_123
|
|
|
|
|
You've removed the standard Visual C++ include and library directories, haven't you...you still need those, but they need to be arranged so that the compiler will look at the 'Microsoft SDK' directories before the standard Visual C++ include directories.
I'm afraid I can't be more specific - I don't have access to VC++ 6 - I don't use anything older than VS 2003.
|
|
|
|
|
i followed, what you are saying.
now i gave the reference for old files also.
now i am getting another errors:
error C2371: 'size_t' : redefinition; different basic types
fatal error C1189: #error : afxv_cpu.h is only for MIPS R4000, DEC AXP, and IBM PowerPC builds.
How do i arrange the Executable, Include, Library and Source files section in
Directories tab of Tools->Option?
and what should be the order of the files?
Which files should i keep in the path for reference and which are not?
waiting for reply.
abc_123
|
|
|
|
|
sunnyram wrote: How do i arrange the Executable, Include, Library and Source files section in
Directories tab of Tools->Option?
<blockquote class="FQ"><div class="FQA">sunnyram wrote:</div>what should be the order of the files?</blockquote>
Source and executable aren't so important. Include and library should include the include and library directories that come with Visual C++ and those that come with the Platform SDK. If you aren't developing for 64-bit, do not include the Win64 directories. The Platform SDK directories should come before (above in the list, I think) the directories from Visual C++.
|
|
|
|
|
Hi,
I want to know whether it is possible to align multiple lines of text vertically and horizontally to a rectangle using the funtion DrawText.
If yes, please let me know for what combination of flags, the DrawText would produce the required output.
FYI flags in that funtion:
DT_CENTER - Centers text horizontally in the rectangle
DT_VCENTER - Centers text vertically. This value is used only with the DT_SINGLELINE value, where as my text is multiple line text.
Also there is this,
DT_CALCRECT - Determines the width and height of the rectangle. If there are multiple lines of text, DrawText uses the width of the rectangle pointed to by the lpRect parameter and extends the base of the rectangle to bound the last line of text. If the largest word is wider than the rectangle, the width is expanded. If the text is less than the width of the rectangle, the width is reduced. If there is only one line of text, DrawText modifies the right side of the rectangle so that it bounds the last character in the line. In either case, DrawText returns the height of the formatted text but does not draw the text.
May be I need to calculate and position text myself? If yes how?
Priya Sundar
modified on Friday, January 16, 2009 1:53 AM
|
|
|
|
|
yeah, draw text can do it.
u need to consider following points
1) select the font for the device context with the required escapement(angle).
2) use draw text to draw one line at a time (this is bcoz some flags are available only for single line). for doing this, calculate the rect for each line.
Prasann
who else
|
|
|
|
|
The way I do it is to use DT_CALCRECT to get the size of the text box needed.
Then, make a fresh rectangle, centred around the place you want to draw the text - in this case, in the middle of your original rectange (ie, rcMyRectangle.CenterPoint () ).
void MyDraw (CString s, CDC *dcOut, CPoint pt)
{
CRect rcSize (0,0,0,0);
dcOut->DrawText (s, &rcSize, DT_CALCRECT | DT_NOPREFIX);
CRect rcOut (pt,pt);
rcOut.Inflate (rcSize.Width () / 2, rcSize.Height () / 2);
dcOut->DrawText (s, &rcOut, DT_LEFT | DT_TOP | DT_NOPREFIX);
}
Tada!
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Hi,
Thanks. I could justify my text now both horizontally and verically.
The modificaiton that needs to be done in the above code to justify the text in the required rectangle is, just replace the flags in the last drawtext function by : DT_CENTER | DT_VCENTER | DT_NOCLIP.
Priya Sundar
|
|
|
|
|
Hi All
How can i get Size of folder and files?Plz help me
|
|
|
|
|
|
|
what should minimum processor spacification for multimediea timers??
we are useing multimidiea timers for multithreading
our project is working well on "Inter(R) pentimu(R) Dual CPU" processor speed is 1.99GHz and RAM is 1GB
but when we run our project on "intel(R)Celeron(R) CPU 2.39 GHz",1GH RAM
project became slow and not capturing events properly (mouse events) and application is not synchronized and works irregular
|
|
|
|
|
anilaabc wrote: but when we run our project on "intel(R)Celeron(R) CPU 2.39 GHz",1GH RAM
project became slow
Well, that's to be expected if your application is able to benefit from multiple cores, even though the clock frequency is increased a bit.
anilaabc wrote: not capturing events properly (mouse events) and application is not synchronized and works irregular
This is suspicious and has nothing to do with multimedia timers. It suggests that you have developed a nice bug somewhere.
The first thing I would look for is threads having their priority set to THREAD_PRIORITY_TIME_CRITICAL , or even that the process is running at a higher priority than NORMAL_PRIORITY_CLASS .
Bumping the priority of a thread or process that consumes a lot a CPU time is always wrong and would lead to the consequences you're describing.
If this is the case, then the reason it works better on a multiple core machine is that one core handles the e.g. mouse input, while the other core is executing the the high prioritized thread doing nothing else.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
In addition to Roger's reply...
I would really look at the design of the code.
I use multimedia timers in heavy multimedia applications (audio, video, etc.)
and it still works well on an old PIII laptop I have running at 1.7Ghz (if I
remember right) and only 256MB RAM.
The OS helps a bit - I saw an improvement in multithread performance starting
with XP, but still, the code has to be designed properly...
Nothing exposes bad multithread design like switching to a multi-core/multi-CPU
machine
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: I would really look at the design of the code.
I second that. Twice.
Mark Salsbery wrote: Nothing exposes bad multithread design like switching to a multi-core/multi-CPU
machine
Hear, hear.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hi,
I know this is not the right forum but as i could not see vb forum i am posting here.
I wrote small vbscript function to add registry key and value. here is the script.
strComputer = "."
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
keyPath = "*\shellex\ContextMenuHandlers\WWBuildShell64Ext"
Return = oReg.CreateKey HKEY_CLASSES_ROOT ,keyPath
If (Return = 0) And (Err.Number = 0) Then
Wscript.Echo "HKEY_LOCAL_MACHINE\Software\MyKey\MySubKey created"
Else
Wscript.Echo "CreateKey failed. Error = " & Err.Number
End If
it is returning 6. What does it mean? how to solve this?
Regards,
|
|
|
|
|
You can ask your question on the Visual Basic[^] but I think you need to check return value of CreateKey.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi all,
Iam facing some strange problem with my application.
My application uses Comport to communciate with the device.
If my application only opened, I can open the serial port and close the port without any problem.
If I open my application and just close the serialport and open hyperterminal and connect it , after some work on hyperterminal again i want to switch to my application by disconnecting hyperterminal.
When I am opening the port again in my application my application hangs,
When it calls any API of comport like, SetCommState()as it is never returning from it.
Why application is hanging when hypertermianl opened and closed in between applciation open uart and close uart.
Thanks in advance..
Regards,
Sunil Kumar
|
|
|
|
|
How do you open the device?
Or in other words: what does your call to ::CreateFile() look like? (Post the code.)
Whenever you're developing software that communicates with communications port, it's usually very nice to have an application that tells you what is going on under the hood. I always use PortMon[^] written by Mark Russinovich. It will tell you exactly what Hyperterminal and your application is doing.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
It may happen if your application (wrongly) relies on some initial state of the serial device (and the Hyperterminal alters it).
As remarked by Roger Stoltz, without posting the relevant code, you hardly will get any help.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I'd like to use owner_draw on a button, but I'd like to draw a little bit and let windows draw the left.
How can I do this?
|
|
|
|
|
If I remember correctly, you could call Default() (but I've been proven wrong many times)
In my experience, either you do it or not do it; there is no middle ground when owner drawing controls.
This signature was proudly tested on animals.
|
|
|
|