X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77c46f00b51b8476ec53691dabbc2fa8a7f6a165..cf2372509cef60accf833de95b1688e0c28b0567:/src/msw/app.cpp diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 72221a117c..ea195db53c 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -111,8 +111,6 @@ const wxChar *wxMDIFrameClassNameNoRedraw = wxT("wxMDIFrameClassNR"); const wxChar *wxMDIChildFrameClassName = wxT("wxMDIChildFrameClass"); const wxChar *wxMDIChildFrameClassNameNoRedraw = wxT("wxMDIChildFrameClassNR"); -HBRUSH wxDisableButtonBrush = (HBRUSH) 0; - // ---------------------------------------------------------------------------- // private functions // ---------------------------------------------------------------------------- @@ -185,7 +183,7 @@ void wxGUIAppTraits::AfterChildWaitLoop(void *dataOrig) { wxEndBusyCursor(); - const ChildWaitLoopData * const data = (ChildWaitLoopData *)dataOrig; + ChildWaitLoopData * const data = (ChildWaitLoopData *)dataOrig; delete data->wd; @@ -193,6 +191,9 @@ void wxGUIAppTraits::AfterChildWaitLoop(void *dataOrig) // the other windows reenabled, the activation is going to return to the // window which had had it before data->winActive->Destroy(); + + // also delete the temporary data object itself + delete data; } bool wxGUIAppTraits::DoMessageFromThreadWait() @@ -322,20 +323,6 @@ bool wxApp::Initialize(int& argc, wxChar **argv) RegisterWindowClasses(); -#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__) - // Create the brush for disabling bitmap buttons - LOGBRUSH lb; - lb.lbStyle = BS_PATTERN; - lb.lbColor = 0; - lb.lbHatch = (int)LoadBitmap( wxhInstance, wxT("wxDISABLE_BUTTON_BITMAP") ); - if ( lb.lbHatch ) - { - wxDisableButtonBrush = ::CreateBrushIndirect( &lb ); - ::DeleteObject( (HGDIOBJ)lb.lbHatch ); - } - //else: wxWidgets resources are probably not linked in -#endif // !__WXMICROWIN__ && !__WXWINCE__ - #if wxUSE_PENWINDOWS wxRegisterPenWin(); #endif @@ -509,9 +496,6 @@ void wxApp::CleanUp() wxCleanUpPenWin(); #endif - if ( wxDisableButtonBrush ) - ::DeleteObject( wxDisableButtonBrush ); - #if wxUSE_OLE #ifdef __WXWINCE__ ::CoUninitialize(); @@ -625,8 +609,7 @@ void wxApp::OnQueryEndSession(wxCloseEvent& event) /* static */ int wxApp::GetComCtl32Version() { -//FIX ME FOR DIGITALMARS!! -#if defined(__WXMICROWIN__) || defined(__WXWINCE__) || defined(__DIGITALMARS__) +#if defined(__WXMICROWIN__) || defined(__WXWINCE__) return 0; #else // cache the result @@ -800,3 +783,33 @@ terminate the program,\r\n\ } #endif // wxUSE_EXCEPTIONS + +// ---------------------------------------------------------------------------- +// deprecated event loop functions +// ---------------------------------------------------------------------------- + +#if WXWIN_COMPATIBILITY_2_4 + +#include "wx/evtloop.h" + +void wxApp::DoMessage(WXMSG *pMsg) +{ + wxEventLoop *evtLoop = wxEventLoop::GetActive(); + if ( evtLoop ) + evtLoop->ProcessMessage(pMsg); +} + +bool wxApp::DoMessage() +{ + wxEventLoop *evtLoop = wxEventLoop::GetActive(); + return evtLoop ? evtLoop->Dispatch() : false; +} + +bool wxApp::ProcessMessage(WXMSG* pMsg) +{ + wxEventLoop *evtLoop = wxEventLoop::GetActive(); + return evtLoop && evtLoop->PreProcessMessage(pMsg); +} + +#endif // WXWIN_COMPATIBILITY_2_4 +