]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/fdrepdlg.cpp
fixed compilation and added a test for OnErase() to the sample
[wxWidgets.git] / src / msw / fdrepdlg.cpp
index 13c4062c8c62c72d686db600e38beb28c8f3015f..5cc89364cd23e1dfd93960b74644ff48c981478d 100644 (file)
@@ -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;