Author: khornicek
Date: Fri Sep 8 19:09:48 2017
New Revision: 75797
URL:
http://svn.reactos.org/svn/reactos?rev=75797&view=rev
Log:
[NOTEPAD]
- don't allow multiple instances of the find/replace dialog
CORE-13744
Modified:
trunk/reactos/base/applications/notepad/dialog.c
Modified: trunk/reactos/base/applications/notepad/dialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/dialog.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/dialog.c [iso-8859-1] Fri Sep 8 19:09:48
2017
@@ -1043,6 +1043,12 @@
static VOID DIALOG_SearchDialog(FINDPROC pfnProc)
{
+ if (Globals.hFindReplaceDlg != NULL)
+ {
+ SetFocus(Globals.hFindReplaceDlg);
+ return;
+ }
+
ZeroMemory(&Globals.find, sizeof(Globals.find));
Globals.find.lStructSize = sizeof(Globals.find);
Globals.find.hwndOwner = Globals.hMainWnd;
@@ -1057,7 +1063,7 @@
/* notify us of incoming events using hMainWnd Window Messages */
Globals.hFindReplaceDlg = pfnProc(&Globals.find);
- assert(Globals.hFindReplaceDlg != 0);
+ assert(Globals.hFindReplaceDlg != NULL);
}
VOID DIALOG_Search(VOID)