VC++ MFC 请问如何改变窗口的背景色?(50分)

[:D][:D]不是只此一条路,是我就会这一条。
我用::SetDCBrushColor,编译无法通过。
要不,上CSND或vckbase.com或vchelp.net去问问。
 
有个预编译设置
把0400改成0500就可以通过了。
去问了,没有反应。
微软的帮助很难理解,看了摸不着头脑。
 
源自MSDN:
-------------------------------------------------------------------------------
Windows GDI
Setting and Retrieving the Device Context Brush Color Value
The following example shows how an application can retrieve the current DC
brush color by using the SetDCBrushColor and the GetDCBrushColor functions.
SelectObject(hdc,GetStockObject(DC_BRUSH);
SetDCBrushColor(hdc, RGB(00,0xff;00);
PatBlt(0,0,200,200,PATCOPY)
SetDCBrushColor(hdc,RGB(00,00,0xff);
PatBlt(0,0,200,200,PATCOPY);
------------------------------------------------------------------------------
如何理解???
请指教!!!!!!
 
不行啊,我这样写了
#define _WIN32_WINNT 0x0500
#include "wingdi.h"
编译还是通不过。要怎么设?
 
我这里是可以的喔
有什么提示错误吗?
 
多人接受答案了。
 

Similar threads

顶部