我用下面的代码可以把客户区刷成白色
hdc = BeginPaint(hWnd, &ps);
// TODO: Add any drawing code here...
DrawWindowFrame(hWnd);
GetClientRect(hWnd, &ClientRect);
FillRect(hdc, &ClientRect, CreateBrushIndirect(&ClientBrush));
EndPaint(hWnd, &ps);但是为什么下面这样就不行呢
myDC = GetDC(hWnd);
SetBkColor(myDC, RGB(1,1,1));
ReleaseDC(hWnd, myDC);
hdc = BeginPaint(hWnd, &ps);
// TODO: Add any drawing code here...
DrawWindowFrame(hWnd);
GetClientRect(hWnd, &ClientRect);
FillRect(hdc, &ClientRect, CreateBrushIndirect(&ClientBrush));
EndPaint(hWnd, &ps);但是为什么下面这样就不行呢
myDC = GetDC(hWnd);
SetBkColor(myDC, RGB(1,1,1));
ReleaseDC(hWnd, myDC);
例如文字的背景色,Dot等类型画笔空白处的颜色......用FillRect挺好用的啊