char name[260]; // 260 is MAX_PATH value from windef.h
::GetModuleFileName(wxhInstance, name, WXSIZEOF(name));
- // GNUWIN32 already fills in the first arg with the application name.
- // JACS: apparently not now (b20 and above?)
-#if 0 // !defined(__GNUWIN32__)
args.Add(name);
- count ++;
-#endif
+ count++;
strcpy(name, wxFileNameFromPath(name));
wxStripExtension(name);
// (double deletion of the cursor).
wxSetCursor(wxNullCursor);
delete g_globalCursor;
+ g_globalCursor = NULL;
wxDeleteStockObjects() ;
// blocks that aren't part of the wxDebugContext itself,
// as a special case. Then when dumping we need to ignore
// wxDebugContext, too.
- if (wxDebugContext::CountObjectsLeft() > 0)
+ if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
{
wxLogDebug("There were memory leaks.");
wxDebugContext::Dump();
* the message. Some may have accelerator tables, or have
* MDI complications.
*/
-bool wxApp::ProcessMessage(WXMSG *Msg)
-{
- MSG *msg = (MSG *)Msg;
- HWND hWnd;
+bool wxApp::ProcessMessage(WXMSG *wxmsg)
+{
+ MSG *msg = (MSG *)wxmsg;
+ HWND hWnd = msg->hwnd;
+ wxWindow *wndThis = wxFindWinFromHandle((WXHWND)hWnd), *wnd;
// Try translations first; find the youngest window with
// a translation table.
- for (hWnd = msg->hwnd; hWnd != (HWND) NULL; hWnd = ::GetParent(hWnd))
+ for ( wnd = wndThis; wnd; wnd = wnd->GetParent() )
{
- wxWindow *wnd = wxFindWinFromHandle((WXHWND) hWnd);
- if (wnd)
- {
- if (wnd->MSWTranslateMessage(Msg))
- return TRUE;
- }
+ if ( wnd->MSWTranslateMessage(wxmsg) )
+ return TRUE;
}
// Anyone for a non-translation message? Try youngest descendants first.
- for (hWnd = msg->hwnd; hWnd != (HWND) NULL; hWnd = ::GetParent(hWnd))
+ for ( wnd = wndThis; wnd; wnd = wnd->GetParent() )
{
- wxWindow *wnd = wxFindWinFromHandle((WXHWND) hWnd);
- if (wnd)
- {
- if (wnd->MSWProcessMessage(Msg))
- return TRUE;
- }
+ if ( wnd->MSWProcessMessage(wxmsg) )
+ return TRUE;
}
+
return FALSE;
}