X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dbda9e86f0e5ec1184bc16d135bb7205bc99236e..e6045e08ed5218ad303ee1f3cb70dd2ad621b322:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 9dcf9a86a1..8b970ba696 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -49,7 +49,11 @@ #include "wx/menuitem.h" #include "wx/log.h" + +#if wxUSE_TOOLTIPS #include "wx/tooltip.h" +#endif + #include "wx/intl.h" #include "wx/log.h" @@ -766,13 +770,14 @@ void wxWindow::AdjustForParentClientOrigin(int& x, int& y, int sizeFlags) bool wxWindow::Show(bool show) { + m_isShown = show; HWND hWnd = (HWND) GetHWND(); int cshow; if (show) cshow = SW_SHOW; else cshow = SW_HIDE; - ShowWindow(hWnd, (BOOL)cshow); + ShowWindow(hWnd, cshow); if (show) { BringWindowToTop(hWnd); @@ -784,7 +789,11 @@ bool wxWindow::Show(bool show) bool wxWindow::IsShown(void) const { - return (::IsWindowVisible((HWND) GetHWND()) != 0); + // Can't rely on IsWindowVisible, since it will return FALSE + // if the parent is not visible. + return m_isShown; +// int ret = ::IsWindowVisible((HWND) GetHWND()) ; +// return (ret != 0); } int wxWindow::GetCharHeight(void) const @@ -2037,7 +2046,7 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg) // it return FALSE; } - +#ifndef __WIN16__ wxButton *btnDefault = GetDefaultItem(); if ( btnDefault && !bCtrlDown ) { @@ -2050,6 +2059,7 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg) // else: but if there is not it makes sense to make it // work like a TAB - and that's what we do. // Note that Ctrl-Enter always works this way. +#endif } break; @@ -3705,6 +3715,21 @@ void wxWindow::OnChar(wxKeyEvent& event) (void) MSWDefWindowProc(m_lastMsg, (WPARAM) id, m_lastLParam); } +void wxWindow::OnKeyDown(wxKeyEvent& event) +{ + Default(); +} + +void wxWindow::OnKeyUp(wxKeyEvent& event) +{ + Default(); +} + +void wxWindow::OnPaint(wxPaintEvent& event) +{ + Default(); +} + bool wxWindow::IsEnabled(void) const { return (::IsWindowEnabled((HWND) GetHWND()) != 0);