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
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;

View File

@@ -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.

View File

@@ -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.

View File

@@ -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

View File

@@ -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
//