Re: Problem with commctrl.h
Has it ever crossed your mind to place all header files after stdafx.h?
Do it and recompile.
Now just for demonstration:
type any raw text before stdafx.h. do not comment it. Compile again and see if anything happens.
ANyway, why "wish to hate"?
Re: Problem with commctrl.h
Yes, tried that still won't compile but now i realized it was because common control header wasn't added. Now that I included the common control header I received something really weird!
"error LNK2019: unresolved external symbol _imp_InitCommonControlsEx@4 referenced in function "long_stdcall WndProc(struct HWND_*, unsigned int, unsigned int, long)" (?WndPRoc@@YGJPAUHWND_@@IIJ@Z)
fatal error LNK1120: 1 unresolved externals"
any clue how to solve this problem and make it compile?
Respond to your question, why "wish to hate"...
wish2hate = I wish to hate you guys but I can't.... means I love you guys no matter what =P
it's a screen name i've been using ever since 10 years+ ago, just too late to change it to something new. I got in trouble once with wikipedia caz they just won't accept this name (it sounds like hater?) lol
Re: Problem with commctrl.h
You need to link to the comctl32.lib library
Re: Problem with commctrl.h
Despite a fact that a header was missing you had to move all #include after stdafx.h if you use precompiled headers. Did you?
Re: Problem with commctrl.h
Quote:
Originally Posted by
Notsosuperhero
You need to link to the comctl32.lib library
May I ask where can I find comctl32.lib? I included cmmctrl.h path and recieved those errors.
And to JohnCz, wat header exactly do I need? and No you don't have to place all headers after stdafx.h. The only thing matters is (this is what I heard) you need to include window.h before common control header
Re: Problem with commctrl.h
Perhaps in lib folder of your installed VSIDE
add #pragma comment(lib,"comctl32.lib") below the #include of your code.
Re: Problem with commctrl.h
You will get the linker errors if you include the header but not the library. The header contains declarations, the library contains the actual implementation of the functions.
comctl32.lib should reside inside the lib folder of the Platform SDK folder, for example mine is:
Code:
C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib
This is with Visual Studio 2005 Standard so it may be a little different with 2008 and Express Edition.
If you can link to the windows stuff, and include windows.h you're compiler should be set up already, since comctl32.lib is part of the Platform SDK.