What value should be returned from my window procedure?
0, , . DefWindowProc().
LPARAM WM_PRINT
, / fumble WM_PRINT. , , PRF_ERASEBKGND, , PRF_CLIENT, .
LPARAM ?
, WM_PAINT lparam. , , , WM_PAINT, WM_PRINTCLIENT. :
case WM_PAINT: {
HDC hdc = BeginPaint(hWnd, &ps);
Draw(hdc);
EndPaint(hWnd, &ps);
break;
}
case WM_PRINTCLIENT: {
HDC hdc = (HDC)wParam;
DWORD flags = (DWORD)lParam;
if (flags & PRF_ERASEBKGND) SendMessage(hWnd, WM_ERASEBKGND, (WPARAM)hdc, NULL);
if (flags & PRF_CLIENT) Draw(hdc);
break;
}
void Draw(HDC hdc) - .