Fixed unthemed dialog painting on Windows Classic.

This commit is contained in:
Pietro Gagliardi 2015-06-07 20:36:03 -04:00
parent cb1b5ee48b
commit 03a5ffe797
2 changed files with 7 additions and 1 deletions

View File

@ -2,7 +2,6 @@
#include "uipriv_windows.h"
// TODO
// - dialog doesn't respond to WM_PRINTCLIENT in Windows Classic
// - can't seem to tab away anymore
struct tab {

View File

@ -88,6 +88,13 @@ static INT_PTR CALLBACK dlgproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar
SetWindowLongPtrW(hwnd, DWLP_MSGRESULT, (LONG_PTR) lResult);
return TRUE;
}
// unthemed dialogs don't respond to WM_PRINTCLIENT
// fortunately they don't have any special painting
if (uMsg == WM_PRINTCLIENT) {
SendMessageW(hwnd, WM_ERASEBKGND, wParam, lParam);
// and pretend we did nothing just so the themed dialog can still paint its content
return FALSE;
}
if (uMsg == WM_INITDIALOG)
return TRUE;
return FALSE;