1 2 3 4 5 6 7 8 9
|
PAINTSTRUCT ps;
RECT rect;
GetClientRect(hwnd, &rect);
hdc = BeginPaint(hwnd, &ps);
back_hdc = CreateCompatibleDC(hdc);
FillRect(back_hdc, &rect, HBRUSH(GetStockObject(LTGRAY_BRUSH)));
DrawGrid(back_hdc, col, row, grid, hwnd);
BitBlt(hdc, 0, 0, rect.right, rect.bottom, back_hdc, 0, 0, SRCCOPY);
EndPaint(hwnd, &ps);
|