-void wxFindReplaceDialogImpl::SubclassDialog(HWND hwnd)
-{
- m_hwndOwner = 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
- 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;
- (void)::SetWindowLong(hwnd, GWL_USERDATA, (LONG)oldParentWndProc);
-
- // and set the new one
- (void)::SetWindowLong(hwnd, GWL_WNDPROC, (LONG)wxFindReplaceWindowProc);
- }
-}
-