diff --git a/src/common/image.cpp b/src/common/image.cpp index 5f61154db2..c563e42248 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -674,7 +674,9 @@ void wxImage::CleanUpHandlers() wxImageHandler *handler = (wxImageHandler *)node->Data(); wxNode *next = node->Next(); delete handler; +#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) delete node; +#endif node = next; } } diff --git a/src/common/list.cpp b/src/common/list.cpp index 971dca379c..c2d8de9c1b 100644 --- a/src/common/list.cpp +++ b/src/common/list.cpp @@ -373,7 +373,9 @@ void wxListBase::DoDeleteNode(wxNodeBase *node) // so that the node knows that it's being deleted by the list node->m_list = NULL; +#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) delete node; +#endif } wxNodeBase *wxListBase::DetachNode(wxNodeBase *node) @@ -532,7 +534,9 @@ void wxListBase::Sort(const wxSortCompareFunction compfunc) void wxObjectListNode::DeleteData() { +#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) delete (wxObject *)GetData(); +#endif } // ----------------------------------------------------------------------------- diff --git a/src/common/object.cpp b/src/common/object.cpp index 00dfc6aa72..19bfac0eab 100644 --- a/src/common/object.cpp +++ b/src/common/object.cpp @@ -363,7 +363,10 @@ void wxObject::UnRef() wxASSERT_MSG( m_refData->m_count > 0, _T("invalid ref data count") ); if ( !--m_refData->m_count ) +#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) +// Until we figure this out delete m_refData; +#endif m_refData = (wxObjectRefData *) NULL; } } diff --git a/src/os2/app.cpp b/src/os2/app.cpp index b187737fea..1bc4e217ef 100644 --- a/src/os2/app.cpp +++ b/src/os2/app.cpp @@ -309,7 +309,9 @@ 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 // @@ -368,7 +370,9 @@ 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 @@ -398,7 +402,9 @@ 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/frame.cpp b/src/os2/frame.cpp index 75f927fb07..9bafc33bff 100644 --- a/src/os2/frame.cpp +++ b/src/os2/frame.cpp @@ -862,8 +862,8 @@ bool wxFrame::OS2Create( ,0L ,0L ,0L - ,NULLHANDLE - ,HWND_TOP + ,m_hFrame + ,HWND_BOTTOM ,(unsigned long)FID_CLIENT ,NULL ,NULL diff --git a/src/os2/gdiimage.cpp b/src/os2/gdiimage.cpp index d4357d6331..321e61e1c1 100644 --- a/src/os2/gdiimage.cpp +++ b/src/os2/gdiimage.cpp @@ -335,7 +335,9 @@ void wxGDIImage::CleanUpHandlers() wxNode* pNext = pNode->Next(); delete pHandler; +#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) delete pNode; +#endif pNode = pNext; } } diff --git a/src/os2/menu.cpp b/src/os2/menu.cpp index 24f4846a87..f318a20c76 100644 --- a/src/os2/menu.cpp +++ b/src/os2/menu.cpp @@ -73,7 +73,7 @@ static wxString TextToLabel(const wxString& rTitle) pc++; Title << wxT('&'); } - else + else Title << wxT('~'); } // else if (*pc == wxT('/')) @@ -169,7 +169,9 @@ wxMenu::~wxMenu() // // Delete accels // +#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) WX_CLEAR_ARRAY(m_vAccels); +#endif #endif // wxUSE_ACCEL } // end of wxMenu::~wxMenu @@ -710,10 +712,12 @@ WXHMENU wxMenuBar::Create() ERRORID vError; wxString sError; MENUITEM vItem; + HWND hSubMenu; // // Set the parent and owner of the submenues to be the menubar, not the desktop // + hSubMenu = m_menus[i]->m_vMenuData.hwndSubMenu; if (!::WinSetParent(m_menus[i]->m_vMenuData.hwndSubMenu, hMenuBar, FALSE)) { vError = ::WinGetLastError(vHabmain); diff --git a/src/os2/thread.cpp b/src/os2/thread.cpp index ac5b0d56ca..94de24c7cd 100644 --- a/src/os2/thread.cpp +++ b/src/os2/thread.cpp @@ -746,11 +746,15 @@ void wxThreadModule::OnExit() if (gs_pCritsectGui) { gs_pCritsectGui->Leave(); +#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) delete gs_pCritsectGui; +#endif gs_pCritsectGui = NULL; } +#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) wxDELETE(gs_pCritsectWaitingForGui); +#endif } // ---------------------------------------------------------------------------- diff --git a/src/os2/window.cpp b/src/os2/window.cpp index bc2904e728..d62acedc44 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -1954,7 +1954,6 @@ MRESULT wxWindow::OS2WindowProc( bProcessed = HandleMouseEvent(uMsg, x, y, (WXUINT)wParam); } break; - case WM_SYSCOMMAND: bProcessed = HandleSysCommand(wParam, lParam); break;