diff --git a/include/wx/os2/frame.h b/include/wx/os2/frame.h index bd3da1f994..94fe07be61 100644 --- a/include/wx/os2/frame.h +++ b/include/wx/os2/frame.h @@ -102,6 +102,7 @@ public: #endif // wxUSE_STATUSBAR WXHMENU GetWinMenu() const { return m_hMenu; } + WXHWND GetFrame() const { return m_hFrame; } // Returns the origin of client area (may be different from (0,0) if the // frame has a toolbar) @@ -217,7 +218,7 @@ private: WXHWND m_hVScroll; // - // Swp structures for various client data + // Swp structures for various client data // DW: Better off in attached RefData? // SWP m_vSwp; diff --git a/include/wx/os2/setup.h b/include/wx/os2/setup.h index 7404ddb6f3..c3af84e11c 100644 --- a/include/wx/os2/setup.h +++ b/include/wx/os2/setup.h @@ -149,7 +149,11 @@ // since you may well need to output // an error log in a production // version (or non-debugging beta) +#if defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ) +#define wxUSE_GLOBAL_MEMORY_OPERATORS 0 +#else #define wxUSE_GLOBAL_MEMORY_OPERATORS 1 +#endif // In debug mode, cause new and delete to be redefined globally. // If this causes problems (e.g. link errors), set this to 0. @@ -181,7 +185,7 @@ // Default is 0. Set to 1 to use the deprecated classes, enum // types, function, member variables. With a setting of 1, full // backward compatability with the 2.0.x release is possible. - // It is STRONGLY recommended that this be set to 0, as + // It is STRONGLY recommended that this be set to 0, as // future development will be done only on the non-deprecated // functions/classes/member variables/etc. diff --git a/include/wx/os2/setup0.h b/include/wx/os2/setup0.h index 7404ddb6f3..c3af84e11c 100644 --- a/include/wx/os2/setup0.h +++ b/include/wx/os2/setup0.h @@ -149,7 +149,11 @@ // since you may well need to output // an error log in a production // version (or non-debugging beta) +#if defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ) +#define wxUSE_GLOBAL_MEMORY_OPERATORS 0 +#else #define wxUSE_GLOBAL_MEMORY_OPERATORS 1 +#endif // In debug mode, cause new and delete to be redefined globally. // If this causes problems (e.g. link errors), set this to 0. @@ -181,7 +185,7 @@ // Default is 0. Set to 1 to use the deprecated classes, enum // types, function, member variables. With a setting of 1, full // backward compatability with the 2.0.x release is possible. - // It is STRONGLY recommended that this be set to 0, as + // It is STRONGLY recommended that this be set to 0, as // future development will be done only on the non-deprecated // functions/classes/member variables/etc. diff --git a/src/os2/app.cpp b/src/os2/app.cpp index 51041ae1c3..94a18e1e2f 100644 --- a/src/os2/app.cpp +++ b/src/os2/app.cpp @@ -309,9 +309,7 @@ void wxApp::CleanUp() // // This will flush the old messages if any // -#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) delete wxLog::SetActiveTarget(new wxLogStderr); -#endif #endif // wxUSE_LOG // @@ -370,9 +368,7 @@ void wxApp::CleanUp() delete wxPendingEvents; #if wxUSE_THREADS -#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) delete wxPendingEventsLocker; -#endif // If we don't do the following, we get an apparent memory leak. ((wxEvtHandler&) wxDefaultValidator).ClearEventLocker(); #endif @@ -402,9 +398,7 @@ void wxApp::CleanUp() #if wxUSE_LOG // do it as the very last thing because everything else can log messages -#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) delete wxLog::SetActiveTarget(NULL); -#endif #endif // wxUSE_LOG } // end of wxApp::CleanUp diff --git a/src/os2/menu.cpp b/src/os2/menu.cpp index b0f6028fff..5b379f2b3c 100644 --- a/src/os2/menu.cpp +++ b/src/os2/menu.cpp @@ -267,6 +267,15 @@ bool wxMenu::DoInsertOrAppend( wxString sError; #if wxUSE_ACCEL UpdateAccel(pItem); + + // + // Ensure the accelerator table is set to the frame (not the client!) + // + if (!::WinSetAccelTable( vHabmain + ,(HWND)pFrame->GetFrame() + ,m_vAccelTable.GetHACCEL() + )) + wxLogLastError("WinSetAccelTable"); #endif // wxUSE_ACCEL //