HBRUSH wxDisableButtonBrush = (HBRUSH) 0;
-MRESULT EXPENTRY wxWndProc( HWND
- ,ULONG
- ,MPARAM
- ,MPARAM
- );
-
// ===========================================================================
// implementation
// ===========================================================================
wxClassInfo::CleanUpClasses();
+ // Delete Message queue
+ if (wxTheApp->m_hMq)
+ ::WinDestroyMsgQueue(wxTheApp->m_hMq);
+
delete wxTheApp;
wxTheApp = NULL;
m_nPrintMode = wxPRINT_WINDOWS;
m_exitOnFrameDelete = TRUE;
m_bAuto3D = TRUE;
+ m_hMq = 0;
} // end of wxApp::wxApp
wxApp::~wxApp()
//
// Delete command-line args
//
+#if wxUSE_UNICODE
int i;
for (i = 0; i < argc; i++)
//
bool wxApp::DoMessage()
{
- BOOL bRc = ::WinGetMsg(vHabmain, &m_vMsg, HWND(NULL), 0, 0);
+ BOOL bRc = ::WinGetMsg(vHabmain, &svCurrentMsg, HWND(NULL), 0, 0);
+ wxUsleep(1000);
if (bRc == 0)
{
// got WM_QUIT
#endif // wxUSE_THREADS
// Process the message
- if (!ProcessMessage((WXMSG *)&svCurrentMsg) )
+ if (!ProcessMessage((WXMSG *)&svCurrentMsg))
{
::WinDispatchMsg(vHabmain, (PQMSG)&svCurrentMsg);
}
#endif // wxUSE_THREADS
while (!Pending() && ProcessIdle())
{
+// wxUsleep(10000);
}
DoMessage();
}
wxLogError(_("Fatal error: exiting"));
wxApp::CleanUp();
-} // end of wxExit
+} // end of wxExit
//
// Yield to incoming messages
{
HAB vHab = 0;
QMSG vMsg;
-
+
//
// Disable log flushing from here because a call to wxYield() shouldn't
// normally result in message boxes popping up &c
}
} // end of wxWakeUpIdle
-HINSTANCE wxGetInstance()
+HAB wxGetInstance()
{
- return wxhInstance;
+ return vHabmain;
}
-void wxSetInstance(HINSTANCE hInst)
+void wxSetInstance(
+ HAB vHab
+)
{
- wxhInstance = hInst;
+ vHabmain = vHab;
}