removal of VA #ifdefs aournd delete operators and some additional support for accelerators

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2000-05-22 14:04:14 +00:00
parent fd4afea729
commit 77bc12b08f
5 changed files with 21 additions and 9 deletions

View File

@@ -102,6 +102,7 @@ public:
#endif // wxUSE_STATUSBAR #endif // wxUSE_STATUSBAR
WXHMENU GetWinMenu() const { return m_hMenu; } 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 // Returns the origin of client area (may be different from (0,0) if the
// frame has a toolbar) // frame has a toolbar)

View File

@@ -149,7 +149,11 @@
// since you may well need to output // since you may well need to output
// an error log in a production // an error log in a production
// version (or non-debugging beta) // 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 #define wxUSE_GLOBAL_MEMORY_OPERATORS 1
#endif
// In debug mode, cause new and delete to be redefined globally. // In debug mode, cause new and delete to be redefined globally.
// If this causes problems (e.g. link errors), set this to 0. // If this causes problems (e.g. link errors), set this to 0.

View File

@@ -149,7 +149,11 @@
// since you may well need to output // since you may well need to output
// an error log in a production // an error log in a production
// version (or non-debugging beta) // 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 #define wxUSE_GLOBAL_MEMORY_OPERATORS 1
#endif
// In debug mode, cause new and delete to be redefined globally. // In debug mode, cause new and delete to be redefined globally.
// If this causes problems (e.g. link errors), set this to 0. // If this causes problems (e.g. link errors), set this to 0.

View File

@@ -309,9 +309,7 @@ void wxApp::CleanUp()
// //
// This will flush the old messages if any // This will flush the old messages if any
// //
#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
delete wxLog::SetActiveTarget(new wxLogStderr); delete wxLog::SetActiveTarget(new wxLogStderr);
#endif
#endif // wxUSE_LOG #endif // wxUSE_LOG
// //
@@ -370,9 +368,7 @@ void wxApp::CleanUp()
delete wxPendingEvents; delete wxPendingEvents;
#if wxUSE_THREADS #if wxUSE_THREADS
#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
delete wxPendingEventsLocker; delete wxPendingEventsLocker;
#endif
// If we don't do the following, we get an apparent memory leak. // If we don't do the following, we get an apparent memory leak.
((wxEvtHandler&) wxDefaultValidator).ClearEventLocker(); ((wxEvtHandler&) wxDefaultValidator).ClearEventLocker();
#endif #endif
@@ -402,9 +398,7 @@ void wxApp::CleanUp()
#if wxUSE_LOG #if wxUSE_LOG
// do it as the very last thing because everything else can log messages // do it as the very last thing because everything else can log messages
#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
delete wxLog::SetActiveTarget(NULL); delete wxLog::SetActiveTarget(NULL);
#endif
#endif // wxUSE_LOG #endif // wxUSE_LOG
} // end of wxApp::CleanUp } // end of wxApp::CleanUp

View File

@@ -267,6 +267,15 @@ bool wxMenu::DoInsertOrAppend(
wxString sError; wxString sError;
#if wxUSE_ACCEL #if wxUSE_ACCEL
UpdateAccel(pItem); 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 #endif // wxUSE_ACCEL
// //