学windows sdk,程序中
SelectObject(hDC,GetStockObject(DC_BRUSH));
SetDCBrushColor(hDC,0x0)
为何总提示
SetDCBrushColor' : undeclared identifier
SelectObject(hDC,GetStockObject(DC_BRUSH));
SetDCBrushColor(hDC,0x0)
为何总提示
SetDCBrushColor' : undeclared identifier
添加到你#include <windows.h>的前面
如果是mfc工程 添加到#include <afxwin.h>的前面
先救火了
所以platform sdk采用了这样一种方法 你必须在程序中显示定义一个宏来告诉platform sdk程序运行的windows版本 这样就可以使用那些必须要求win2000以上才可以使用的宏定义和函数了
刚才那个其实 #define _WIN32_WINNT 0x0500就可以(表示win2000)
再添一句 你可以在wingdi.h中看到这样的定义
#if (_WIN32_WINNT >= 0x0500)
#define DC_BRUSH 18
#define DC_PEN 19
#endif#if (_WIN32_WINNT >= 0x0500)
WINGDIAPI COLORREF WINAPI SetDCBrushColor(HDC, COLORREF);
WINGDIAPI COLORREF WINAPI SetDCPenColor(HDC, COLORREF);
#endif这样你就应该清楚了
Windows 95/98/Me: Unsupported.-----------------------------
Header: Declared in Wingdi.h; include Windows.h.
Library: Use Gdi32.lib.
道歉!!
:)