// headers
// ----------------------------------------------------------------------------
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "mswfdrepdlg.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// 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) )
- {
- // set the new one and save the old as user data to allow access to it
- // from wxFindReplaceWindowProc
- m_oldParentWndProc = wxSetWindowProc(hwnd, wxFindReplaceWindowProc);
+ wxCHECK_RET( wxGetWindowProc(hwnd) != (void *)wxFindReplaceWindowProc,
+ _T("can't have more than one find dialog currently") );
- wxSetWindowUserData(hwnd, (void *)m_oldParentWndProc);
- }
+ // set the new one and save the old as user data to allow access to it
+ // from wxFindReplaceWindowProc
+ m_oldParentWndProc = wxSetWindowProc(hwnd, wxFindReplaceWindowProc);
+
+ wxSetWindowUserData(hwnd, (void *)m_oldParentWndProc);
}
wxFindReplaceDialogImpl::~wxFindReplaceDialogImpl()
// of UNICOWS.DLL send the correct UNICODE item after button press
// and a bogus ANSI mode item right after this, so lets ignore
// the second bogus message
- if ( s_lastMsgFlags == pFR->Flags )
+ if ( wxUsingUnicowsDll() && s_lastMsgFlags == pFR->Flags )
{
s_lastMsgFlags = 0;
return 0;