X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14fca7389aa93dee91a68cd0a25789c2b4b42879..d21d2e5adf7a5acf3b496a9c4e87eab220bd75d8:/src/msw/fdrepdlg.cpp?ds=sidebyside diff --git a/src/msw/fdrepdlg.cpp b/src/msw/fdrepdlg.cpp index 13c4062c8c..5cc89364cd 100644 --- a/src/msw/fdrepdlg.cpp +++ b/src/msw/fdrepdlg.cpp @@ -197,10 +197,9 @@ void wxFindReplaceDialogImpl::SubclassDialog(HWND hwnd) // check that we don't subclass the parent twice: this would be a bad idea // as then we'd have infinite recursion in wxFindReplaceWindowProc - WNDPROC oldParentWndProc = (WNDPROC)::GetWindowLong(hwnd, GWL_WNDPROC); - - if ( oldParentWndProc != wxFindReplaceWindowProc ) + if ( !wxCheckWindowWndProc((WXHWND)hwnd, (WXFARPROC)wxFindReplaceWindowProc) ) { + WNDPROC oldParentWndProc = (WNDPROC)::GetWindowLong(hwnd, GWL_WNDPROC); // save old wnd proc elsewhere to access it from // wxFindReplaceWindowProc m_oldParentWndProc = oldParentWndProc;