From cf8ff92f83af3d5d0356bba91763354ea83ec6d7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 19 Dec 2004 20:56:38 +0000 Subject: [PATCH] moved wxWindow::m_hMenu to wxFrame, it is not needed in the base class git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/frame.h | 7 +++++++ include/wx/msw/window.h | 2 -- src/msw/frame.cpp | 4 ++++ src/msw/window.cpp | 5 +---- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/include/wx/msw/frame.h b/include/wx/msw/frame.h index 7decd43e5c..c7fb8ed76c 100644 --- a/include/wx/msw/frame.h +++ b/include/wx/msw/frame.h @@ -83,7 +83,9 @@ public: { return m_useNativeStatusBar; }; #endif // wxUSE_STATUSBAR +#if wxUSE_MENUS WXHMENU GetWinMenu() const { return m_hMenu; } +#endif // wxUSE_MENUS // event handlers bool HandlePaint(); @@ -142,6 +144,11 @@ protected: static bool m_useNativeStatusBar; #endif // wxUSE_STATUSBAR +#if wxUSE_MENUS + // frame menu, NULL if none + WXHMENU m_hMenu; +#endif // wxUSE_MENUS + private: #if wxUSE_TOOLTIPS WXHWND m_hwndToolTip; diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index 4469b413f4..a4ce110bc6 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -437,8 +437,6 @@ protected: int m_lastMouseEvent; #endif // wxUSE_MOUSEEVENT_HACK - WXHMENU m_hMenu; // Menu, if any - // implement the base class pure virtuals virtual void DoClientToScreen( int *x, int *y ) const; virtual void DoScreenToClient( int *x, int *y ) const; diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 06e51b1f68..395a6602e1 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -169,6 +169,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow) void wxFrame::Init() { +#if wxUSE_MENUS + m_hMenu = NULL; +#endif // wxUSE_MENUS + #if wxUSE_TOOLTIPS m_hwndToolTip = 0; #endif diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 90fffdc037..554055c246 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -436,9 +436,6 @@ void wxWindowMSW::Init() m_childrenDisabled = NULL; m_frozenness = 0; - // wxWnd - m_hMenu = 0; - m_hWnd = 0; m_xThumbSize = 0; @@ -4066,7 +4063,7 @@ WXHBRUSH wxWindowMSW::MSWGetBgBrush(WXHDC hDC) // background is not inherited beyond the windows which have their own // fixed background such as top level windows and notebooks - if ( win->IsTopLevel() /* ProvidesBackground() */ ) + if ( win->ProvidesBackground() ) break; } -- 2.47.2