G
Guest
i am writing a Win32 application at the moment. I have main.cpp which
registers, creates and handles message loop. I then have another file called
CustomButton.h. Inside that one i have made some of my own functions to do
customizations on Button controls.
However, when calling some functions and typedefs from wingdi.h i get an
'identifier not found' error. For example, calling this function:
SetDCPenColor()
i found that it is nested inside this pre-processor statement:
#if (_WIN32_WINNT >= 0x0500)
WINGDIAPI COLORREF WINAPI SetDCBrushColor(IN HDC, IN COLORREF);
WINGDIAPI COLORREF WINAPI SetDCPenColor(IN HDC, IN COLORREF);
#endif
in wingdi.h. I have treid to #define _WIN32_WINNT 0x0500 in my main.cpp. I
have tried to comment out the if and endif...not work. I have tried to
manullt add the include file in main.cpp...not work. I have checked which
header it is referencing for the function by hovering over the function call
in my code, then right clicking and going to 'Goto Declaration'. It goes to
wingdi.h. Then hovering over the tab to see the tooltip info of where the
file is to make sure there are no duplicates; there arent.
i am at a wits end. i feel i have tried everything, but i cartn have as it
still doesnt fix the error. I want to resolve this not just to get the code
working, but also as for future use and to undestand what i missed.
if there is anybody out that has come across this or knows that is missing,
or has some suggestions, please let me know!!
thanks in advance
registers, creates and handles message loop. I then have another file called
CustomButton.h. Inside that one i have made some of my own functions to do
customizations on Button controls.
However, when calling some functions and typedefs from wingdi.h i get an
'identifier not found' error. For example, calling this function:
SetDCPenColor()
i found that it is nested inside this pre-processor statement:
#if (_WIN32_WINNT >= 0x0500)
WINGDIAPI COLORREF WINAPI SetDCBrushColor(IN HDC, IN COLORREF);
WINGDIAPI COLORREF WINAPI SetDCPenColor(IN HDC, IN COLORREF);
#endif
in wingdi.h. I have treid to #define _WIN32_WINNT 0x0500 in my main.cpp. I
have tried to comment out the if and endif...not work. I have tried to
manullt add the include file in main.cpp...not work. I have checked which
header it is referencing for the function by hovering over the function call
in my code, then right clicking and going to 'Goto Declaration'. It goes to
wingdi.h. Then hovering over the tab to see the tooltip info of where the
file is to make sure there are no duplicates; there arent.
i am at a wits end. i feel i have tried everything, but i cartn have as it
still doesnt fix the error. I want to resolve this not just to get the code
working, but also as for future use and to undestand what i missed.
if there is anybody out that has come across this or knows that is missing,
or has some suggestions, please let me know!!
thanks in advance