MSWProcessMessage speed up by a factor of 100 (at least)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f7c832a786
commit
d3f0a137d2
@ -932,34 +932,27 @@ void wxApp::Dispatch()
|
|||||||
* the message. Some may have accelerator tables, or have
|
* the message. Some may have accelerator tables, or have
|
||||||
* MDI complications.
|
* MDI complications.
|
||||||
*/
|
*/
|
||||||
bool wxApp::ProcessMessage(WXMSG *Msg)
|
bool wxApp::ProcessMessage(WXMSG *wxmsg)
|
||||||
{
|
{
|
||||||
MSG *msg = (MSG *)Msg;
|
MSG *msg = (MSG *)wxmsg;
|
||||||
|
HWND hWnd = msg->hwnd;
|
||||||
HWND hWnd;
|
wxWindow *wndThis = wxFindWinFromHandle((WXHWND)hWnd), *wnd;
|
||||||
|
|
||||||
// Try translations first; find the youngest window with
|
// Try translations first; find the youngest window with
|
||||||
// a translation table.
|
// 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->MSWTranslateMessage(wxmsg) )
|
||||||
if (wnd)
|
|
||||||
{
|
|
||||||
if (wnd->MSWTranslateMessage(Msg))
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Anyone for a non-translation message? Try youngest descendants first.
|
// 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->MSWProcessMessage(wxmsg) )
|
||||||
if (wnd)
|
|
||||||
{
|
|
||||||
if (wnd->MSWProcessMessage(Msg))
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user