hBrush is never assigned a value anywhere in my program. Yet the function works.Code:HBRUSH hBrush, hDfltbrush;
hDfltbrush = SelectObject(hDc, GetStockObject(DC_BRUSH));
void updateclient(void)
{
static PAINTSTRUCT ps;
SetDCBrushColor(hDc, 0x000000);
BeginPaint(hWnd, &ps);
FillRect(hDc, &ps.rcPaint, hBrush);
EndPaint(hWnd, &ps);
}
SelectObject(hDc, hDfltbrush);
Is the hBrush argument ignored with stock objects?