X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e5c0b16a78bff758f5167cc2afe3d0012b5cbb86..58a8ab88685a72ac030d5e2ade62b4d796f11bed:/src/msw/app.cpp?ds=sidebyside diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 055aa2f3b1..516e779441 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -346,7 +346,7 @@ bool wxApp::RegisterWindowClasses() wndclass2.cbWndExtra = sizeof( DWORD ); // was 4 wndclass2.hInstance = wxhInstance; wndclass2.hIcon = (HICON) NULL; - wndclass2.hCursor = (HCURSOR) NULL; + wndclass2.hCursor = LoadCursor( (HINSTANCE) NULL, IDC_ARROW ); // wndclass2.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1) ; wndclass2.hbrBackground = (HBRUSH) GetStockObject( LTGRAY_BRUSH ); wndclass2.lpszMenuName = NULL; @@ -371,7 +371,7 @@ bool wxApp::RegisterWindowClasses() wndclass3.cbWndExtra = sizeof( DWORD ); // was 4 wndclass3.hInstance = wxhInstance; wndclass3.hIcon = (HICON) NULL; - wndclass3.hCursor = (HCURSOR) NULL; + wndclass3.hCursor = LoadCursor( (HINSTANCE) NULL, IDC_ARROW ); // wndclass3.hbrBackground = (HBRUSH)(COLOR_WINDOW+1) ; wndclass3.hbrBackground = (HBRUSH) NULL; wndclass3.lpszMenuName = NULL; @@ -398,12 +398,8 @@ void wxApp::ConvertToStandardCommandArgs(char* lpCmdLine) 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); @@ -491,6 +487,7 @@ void wxApp::CleanUp() // (double deletion of the cursor). wxSetCursor(wxNullCursor); delete g_globalCursor; + g_globalCursor = NULL; wxDeleteStockObjects() ; @@ -932,34 +929,28 @@ void wxApp::Dispatch() * 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; }