diff --git a/uppsrc/CtrlCore/Win32Wnd.cpp b/uppsrc/CtrlCore/Win32Wnd.cpp index 189536c95..3c5209fe1 100644 --- a/uppsrc/CtrlCore/Win32Wnd.cpp +++ b/uppsrc/CtrlCore/Win32Wnd.cpp @@ -132,7 +132,7 @@ LRESULT CALLBACK Ctrl::OverwatchWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR if(ShutdownBlockReasonDestroy) ShutdownBlockReasonDestroy(hwnd); ELOGW("WM_QUERYENDSESSION 2"); - return TRUE; + return TRUE; } if(msg == WM_ENDSESSION) { EndSession(); @@ -611,26 +611,6 @@ void Ctrl::NcDestroy() WndFree(); } -bool Ctrl::DumpMessage(Ctrl *w, UINT message, WPARAM wParam, LPARAM lParam) -{ - if(message != WM_SETCURSOR && message != WM_CTLCOLORBTN && message != WM_TIMER && -#ifndef PLATFORM_WINCE - message != WM_NCHITTEST && message != WM_ENTERIDLE && -#endif - message != WM_CTLCOLORDLG && message != WM_CTLCOLOREDIT && message != WM_CTLCOLORLISTBOX && - message != WM_CTLCOLORMSGBOX && message != WM_CTLCOLORSCROLLBAR && - message != WM_CTLCOLORSTATIC && message != WM_CANCELMODE && - message != 0x0118) - for(WinMsg *m = sWinMsg; m->ID; m++) - if(m->ID == message) { - RLOG(m->name << ' ' << UPP::Name(w) << - Sprintf(", wParam = %d (0x%x), lParam = %d (0x%x)", - wParam, wParam, lParam, lParam)); - return true; - } - return false; -} - LRESULT CALLBACK Ctrl::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { GuiLock __; @@ -667,9 +647,24 @@ LRESULT CALLBACK Ctrl::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lP Windows().SetKey(i, NULL); } #if LOGMESSAGES - bool logblk = DumpMessage(w, message, wParam, lParam); - if(logblk) - VppLog() << LOG_BEGIN; + bool logblk = false; + if(message != WM_SETCURSOR && message != WM_CTLCOLORBTN && message != WM_TIMER && +#ifndef PLATFORM_WINCE + message != WM_NCHITTEST && message != WM_ENTERIDLE && +#endif + message != WM_CTLCOLORDLG && message != WM_CTLCOLOREDIT && message != WM_CTLCOLORLISTBOX && + message != WM_CTLCOLORMSGBOX && message != WM_CTLCOLORSCROLLBAR && + message != WM_CTLCOLORSTATIC && message != WM_CANCELMODE && + message != 0x0118) + for(WinMsg *m = sWinMsg; m->ID; m++) + if(m->ID == message) { + RLOG(m->name << ' ' << UPP::Name(w) << + Sprintf(", wParam = %d (0x%x), lParam = %d (0x%x)", + wParam, wParam, lParam, lParam)); + VppLog() << LOG_BEGIN; + logblk = true; + break; + } #endif LRESULT l = 0; if(w) {