Overdue change: handled WM_PRINTCLIENT in uiWindow.

This commit is contained in:
Pietro Gagliardi 2015-06-07 22:06:41 -04:00
parent 317c4dbc22
commit 557ee68e47
2 changed files with 7 additions and 0 deletions

View File

@ -91,6 +91,8 @@ static INT_PTR CALLBACK dlgproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar
// unthemed dialogs don't respond to WM_PRINTCLIENT
// fortunately they don't have any special painting
if (uMsg == WM_PRINTCLIENT) {
// don't worry about the return value; hopefully DefWindowProcW() caught it (if not the dialog procedure itself)
// we COULD paint the dialog background brush ourselves but meh, it works
SendMessageW(hwnd, WM_ERASEBKGND, wParam, lParam);
// and pretend we did nothing just so the themed dialog can still paint its content
return FALSE;

View File

@ -50,6 +50,11 @@ static LRESULT CALLBACK windowWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
if (w->child != NULL)
uiControlQueueResize(uiControl(w));
return 0;
case WM_PRINTCLIENT:
// we do no special painting; just erase the background
// don't worry about the return value; we let DefWindowProcW() handle this message
SendMessageW(hwnd, WM_ERASEBKGND, wParam, lParam);
return 0;
case WM_CLOSE:
if ((*(w->onClosing))(uiWindow(w), w->onClosingData))
uiControlDestroy(uiControl(w));