ReactOS  0.4.14-dev-358-gbef841c
finddlg.c
Go to the documentation of this file.
1 /*
2  * Common Dialog Boxes interface (32 bit)
3  * Find/Replace
4  *
5  * Copyright 1998,1999 Bertho A. Stultiens
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21 
22 #include <stdarg.h>
23 #include <string.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winnls.h"
27 #include "wingdi.h"
28 #include "winuser.h"
29 #include "commdlg.h"
30 #include "cderr.h"
31 #include "dlgs.h"
32 #include "wine/debug.h"
33 #include "wine/heap.h"
34 
36 
37 #include "cdlg.h"
38 
39 
40 /*-----------------------------------------------------------------------*/
41 
44 
45 #define FR_MASK (FR_DOWN | FR_MATCHCASE | FR_WHOLEWORD | FR_REPLACEALL | FR_REPLACE | FR_FINDNEXT | FR_DIALOGTERM)
46 /* CRITICAL_SECTION COMDLG32_CritSect; */
47 
48 /* Notes:
49  * MS uses a critical section at a few locations. However, I fail to
50  * see the reason for this. Their comdlg32.dll has a few race conditions
51  * but _not_ at those places that are protected with the mutex (there are
52  * globals that seem to hold info for the wndproc).
53  *
54  * FindText[AW]/ReplaceText[AW]
55  * The find/replace calls are passed a structure that is _not_ used
56  * internally. There is a local copy that holds the running info to
57  * be able to combine xxxA and xxxW calls. The passed pointer is
58  * returned upon sendmessage. Apps won't break this way when they rely
59  * on the original pointer. This will work as long as the sizes of
60  * FINDREPLACEA == FINDREPLACEW. The local copy will also prevent
61  * the app to see the wine-specific extra flags to distinguish between
62  * A/W and Find/Replace.
63  */
64 
65 
66 /***********************************************************************
67  * COMDLG32_FR_GetFlags [internal]
68  * Returns the button state that needs to be reported to the caller.
69  * RETURNS
70  * Current state of check and radio buttons
71  */
73 {
74  DWORD flags = 0;
75  if(IsDlgButtonChecked(hDlgWnd, rad2) == BST_CHECKED)
76  flags |= FR_DOWN;
77  if(IsDlgButtonChecked(hDlgWnd, chx1) == BST_CHECKED)
79  if(IsDlgButtonChecked(hDlgWnd, chx2) == BST_CHECKED)
81  return flags;
82 }
83 
84 /***********************************************************************
85  * COMDLG32_FR_HandleWMCommand [internal]
86  * Handle WM_COMMAND messages...
87  */
89 {
90  DWORD flag;
91 
92  pData->user_fr.fra->Flags &= ~FR_MASK; /* Clear return flags */
93  if(pData->fr.Flags & FR_WINE_REPLACE) /* Replace always goes down... */
94  pData->user_fr.fra->Flags |= FR_DOWN;
95 
96  if(NotifyCode == BN_CLICKED)
97  {
98  switch(Id)
99  {
100  case IDOK: /* Find Next */
101  if(GetDlgItemTextA(hDlgWnd, edt1, pData->fr.lpstrFindWhat, pData->fr.wFindWhatLen) > 0)
102  {
103  pData->user_fr.fra->Flags |= COMDLG32_FR_GetFlags(hDlgWnd) | FR_FINDNEXT;
104  if(pData->fr.Flags & FR_WINE_UNICODE)
105  {
106  MultiByteToWideChar( CP_ACP, 0, pData->fr.lpstrFindWhat, -1,
107  pData->user_fr.frw->lpstrFindWhat,
108  0x7fffffff );
109  }
110  else
111  {
112  strcpy(pData->user_fr.fra->lpstrFindWhat, pData->fr.lpstrFindWhat);
113  }
114  SendMessageA(pData->fr.hwndOwner, FindReplaceMessage, 0, (LPARAM)pData->user_fr.fra);
115  }
116  break;
117 
118  case IDCANCEL:
119  pData->user_fr.fra->Flags |= COMDLG32_FR_GetFlags(hDlgWnd) | FR_DIALOGTERM;
120  SendMessageA(pData->fr.hwndOwner, FindReplaceMessage, 0, (LPARAM)pData->user_fr.fra);
121  DestroyWindow(hDlgWnd);
122  break;
123 
124  case psh2: /* Replace All */
126  goto Replace;
127 
128  case psh1: /* Replace */
129  flag = FR_REPLACE;
130 Replace:
131  if((pData->fr.Flags & FR_WINE_REPLACE)
132  && GetDlgItemTextA(hDlgWnd, edt1, pData->fr.lpstrFindWhat, pData->fr.wFindWhatLen) > 0)
133  {
134  pData->fr.lpstrReplaceWith[0] = 0; /* In case the next GetDlgItemText Fails */
135  GetDlgItemTextA(hDlgWnd, edt2, pData->fr.lpstrReplaceWith, pData->fr.wReplaceWithLen);
136  pData->user_fr.fra->Flags |= COMDLG32_FR_GetFlags(hDlgWnd) | flag;
137  if(pData->fr.Flags & FR_WINE_UNICODE)
138  {
139  MultiByteToWideChar( CP_ACP, 0, pData->fr.lpstrFindWhat, -1,
140  pData->user_fr.frw->lpstrFindWhat,
141  0x7fffffff );
142  MultiByteToWideChar( CP_ACP, 0, pData->fr.lpstrReplaceWith, -1,
143  pData->user_fr.frw->lpstrReplaceWith,
144  0x7fffffff );
145  }
146  else
147  {
148  strcpy(pData->user_fr.fra->lpstrFindWhat, pData->fr.lpstrFindWhat);
149  strcpy(pData->user_fr.fra->lpstrReplaceWith, pData->fr.lpstrReplaceWith);
150  }
151  SendMessageA(pData->fr.hwndOwner, FindReplaceMessage, 0, (LPARAM)pData->user_fr.fra);
152  }
153  break;
154 
155  case pshHelp:
156  pData->user_fr.fra->Flags |= COMDLG32_FR_GetFlags(hDlgWnd);
157  SendMessageA(pData->fr.hwndOwner, HelpMessage, (WPARAM)hDlgWnd, (LPARAM)pData->user_fr.fra);
158  break;
159  }
160  }
161  else if(NotifyCode == EN_CHANGE && Id == edt1)
162  {
163  BOOL enable = SendDlgItemMessageA(hDlgWnd, edt1, WM_GETTEXTLENGTH, 0, 0) > 0;
164  EnableWindow(GetDlgItem(hDlgWnd, IDOK), enable);
165  if(pData->fr.Flags & FR_WINE_REPLACE)
166  {
167  EnableWindow(GetDlgItem(hDlgWnd, psh1), enable);
168  EnableWindow(GetDlgItem(hDlgWnd, psh2), enable);
169  }
170  }
171 }
172 
173 /***********************************************************************
174  * COMDLG32_FindReplaceDlgProc [internal]
175  * [Find/Replace]Text32[A/W] window procedure.
176  */
178 {
180  INT_PTR retval = TRUE;
181 
182  if(iMsg == WM_INITDIALOG)
183  {
185  if(!SetPropA(hDlgWnd, (LPSTR)COMDLG32_Atom, (HANDLE)pdata))
186  {
187  ERR("Could not Set prop; invent a graceful exit?...\n");
188  DestroyWindow(hDlgWnd);
189  return FALSE;
190  }
191  SendDlgItemMessageA(hDlgWnd, edt1, EM_SETLIMITTEXT, pdata->fr.wFindWhatLen, 0);
192  SendDlgItemMessageA(hDlgWnd, edt1, WM_SETTEXT, 0, (LPARAM)pdata->fr.lpstrFindWhat);
193  if(pdata->fr.Flags & FR_WINE_REPLACE)
194  {
195  SendDlgItemMessageA(hDlgWnd, edt2, EM_SETLIMITTEXT, pdata->fr.wReplaceWithLen, 0);
196  SendDlgItemMessageA(hDlgWnd, edt2, WM_SETTEXT, 0, (LPARAM)pdata->fr.lpstrReplaceWith);
197  }
198 
199  if(!(pdata->fr.Flags & FR_SHOWHELP))
200  ShowWindow(GetDlgItem(hDlgWnd, pshHelp), SW_HIDE);
201  if(pdata->fr.Flags & FR_HIDEUPDOWN)
202  {
203  ShowWindow(GetDlgItem(hDlgWnd, rad1), SW_HIDE);
204  ShowWindow(GetDlgItem(hDlgWnd, rad2), SW_HIDE);
205  ShowWindow(GetDlgItem(hDlgWnd, grp1), SW_HIDE);
206  }
207  else if(pdata->fr.Flags & FR_NOUPDOWN)
208  {
209  EnableWindow(GetDlgItem(hDlgWnd, rad1), FALSE);
210  EnableWindow(GetDlgItem(hDlgWnd, rad2), FALSE);
211  EnableWindow(GetDlgItem(hDlgWnd, grp1), FALSE);
212  }
213  else
214  {
215  SendDlgItemMessageA(hDlgWnd, rad1, BM_SETCHECK, pdata->fr.Flags & FR_DOWN ? 0 : BST_CHECKED, 0);
216  SendDlgItemMessageA(hDlgWnd, rad2, BM_SETCHECK, pdata->fr.Flags & FR_DOWN ? BST_CHECKED : 0, 0);
217  }
218 
219  if(pdata->fr.Flags & FR_HIDEMATCHCASE)
220  ShowWindow(GetDlgItem(hDlgWnd, chx2), SW_HIDE);
221  else if(pdata->fr.Flags & FR_NOMATCHCASE)
222  EnableWindow(GetDlgItem(hDlgWnd, chx2), FALSE);
223  else
224  SendDlgItemMessageA(hDlgWnd, chx2, BM_SETCHECK, pdata->fr.Flags & FR_MATCHCASE ? BST_CHECKED : 0, 0);
225 
226  if(pdata->fr.Flags & FR_HIDEWHOLEWORD)
227  ShowWindow(GetDlgItem(hDlgWnd, chx1), SW_HIDE);
228  else if(pdata->fr.Flags & FR_NOWHOLEWORD)
229  EnableWindow(GetDlgItem(hDlgWnd, chx1), FALSE);
230  else
231  SendDlgItemMessageA(hDlgWnd, chx1, BM_SETCHECK, pdata->fr.Flags & FR_WHOLEWORD ? BST_CHECKED : 0, 0);
232 
233  /* We did the init here, now call the hook if requested */
234 
235  /* We do not do ShowWindow if hook exists and is FALSE */
236  /* per MSDN Article Q96135 */
237  if((pdata->fr.Flags & FR_ENABLEHOOK)
238  && ! pdata->fr.lpfnHook(hDlgWnd, iMsg, wParam, (LPARAM) &pdata->fr))
239  return TRUE;
240  ShowWindow(hDlgWnd, SW_SHOWNORMAL);
241  UpdateWindow(hDlgWnd);
242  return TRUE;
243  }
244 
245  if(pdata && (pdata->fr.Flags & FR_ENABLEHOOK))
246  {
247  retval = pdata->fr.lpfnHook(hDlgWnd, iMsg, wParam, lParam);
248  }
249  else
250  retval = FALSE;
251 
252  if(pdata && !retval)
253  {
254  retval = TRUE;
255  switch(iMsg)
256  {
257  case WM_COMMAND:
259  break;
260 
261  case WM_CLOSE:
263  break;
264 
265  case WM_HELP:
266  /* Heeeeelp! */
267  FIXME("Got WM_HELP. Who is gonna supply it?\n");
268  break;
269 
270  case WM_CONTEXTMENU:
271  /* Heeeeelp! */
272  FIXME("Got WM_CONTEXTMENU. Who is gonna supply it?\n");
273  break;
274  /* FIXME: Handle F1 help */
275 
276  default:
277  retval = FALSE; /* We did not handle the message */
278  }
279  }
280 
281  /* WM_DESTROY is a special case.
282  * We need to ensure that the allocated memory is freed just before
283  * the dialog is killed. We also need to remove the added prop.
284  */
285  if(iMsg == WM_DESTROY)
286  {
287  RemovePropA(hDlgWnd, (LPSTR)COMDLG32_Atom);
288  heap_free(pdata);
289  }
290 
291  return retval;
292 }
293 
294 /***********************************************************************
295  * COMDLG32_FR_CheckPartial [internal]
296  * Check various fault conditions in the supplied parameters that
297  * cause an extended error to be reported.
298  * RETURNS
299  * TRUE: Success
300  * FALSE: Failure
301  */
303  const FINDREPLACEA *pfr, /* [in] Find structure */
304  BOOL Replace /* [in] True if called as replace */
305 ) {
306  if(!pfr)
307  {
309  return FALSE;
310  }
311 
312  if(pfr->lStructSize != sizeof(FINDREPLACEA))
313  {
315  return FALSE;
316  }
317 
318  if(!IsWindow(pfr->hwndOwner))
319  {
321  return FALSE;
322  }
323 
324  if((pfr->wFindWhatLen < 1 || !pfr->lpstrFindWhat)
325  ||(Replace && !pfr->lpstrReplaceWith))
326  {
328  return FALSE;
329  }
330 
332  {
334  return FALSE;
335  }
337  {
339  return FALSE;
340  }
341 
342  if((pfr->Flags & FR_ENABLEHOOK) && !pfr->lpfnHook)
343  {
345  return FALSE;
346  }
347 
348  if((pfr->Flags & FR_ENABLETEMPLATEHANDLE) && !pfr->hInstance)
349  {
351  return FALSE;
352  }
353 
354  return TRUE;
355 }
356 
357 /***********************************************************************
358  * COMDLG32_FR_DoFindReplace [internal]
359  * Actual load and creation of the Find/Replace dialog.
360  * RETURNS
361  * Window handle to created dialog:Success
362  * NULL:Failure
363  */
365  COMDLG32_FR_Data *pdata /* [in] Internal data structure */
366 ) {
367  HWND hdlgwnd = 0;
368  HGLOBAL loadrc;
369  DWORD error;
370  LPDLGTEMPLATEW rcs;
371 
372  TRACE("hInst=%p, Flags=%08x\n", pdata->fr.hInstance, pdata->fr.Flags);
373 
374  if(!(pdata->fr.Flags & FR_ENABLETEMPLATEHANDLE))
375  {
377  HRSRC htemplate;
378  if(pdata->fr.Flags & FR_ENABLETEMPLATE)
379  {
380  hmod = pdata->fr.hInstance;
381  if(pdata->fr.Flags & FR_WINE_UNICODE)
382  {
383  htemplate = FindResourceW(hmod, (LPCWSTR)pdata->fr.lpTemplateName, (LPWSTR)RT_DIALOG);
384  }
385  else
386  {
387  htemplate = FindResourceA(hmod, pdata->fr.lpTemplateName, (LPCSTR)RT_DIALOG);
388  }
389  }
390  else
391  {
392  int rcid = pdata->fr.Flags & FR_WINE_REPLACE ? REPLACEDLGORD
393  : FINDDLGORD;
394  htemplate = FindResourceA(hmod, MAKEINTRESOURCEA(rcid), (LPCSTR)RT_DIALOG);
395  }
396  if(!htemplate)
397  {
399  goto cleanup;
400  }
401 
402  loadrc = LoadResource(hmod, htemplate);
403  }
404  else
405  {
406  loadrc = pdata->fr.hInstance;
407  }
408 
409  if(!loadrc)
410  {
412  goto cleanup;
413  }
414 
415  if((rcs = LockResource(loadrc)) == NULL)
416  {
418  goto cleanup;
419  }
420 
422  rcs,
423  pdata->fr.hwndOwner,
425  (LPARAM)pdata);
426  if(!hdlgwnd)
427  {
429 cleanup:
431  heap_free(pdata);
432  }
433  return hdlgwnd;
434 }
435 
436 /***********************************************************************
437  * FindTextA [COMDLG32.@]
438  *
439  * See FindTextW.
440  */
442  LPFINDREPLACEA pfr /* [in] Find/replace structure*/
443 ) {
445 
446  TRACE("LPFINDREPLACE=%p\n", pfr);
447 
449  return 0;
450 
451  if((pdata = COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data))) == NULL)
452  return 0; /* Error has been set */
453 
454  pdata->user_fr.fra = pfr;
455  pdata->fr = *pfr;
457 }
458 
459 /***********************************************************************
460  * ReplaceTextA [COMDLG32.@]
461  *
462  * See ReplaceTextW.
463  */
465  LPFINDREPLACEA pfr /* [in] Find/replace structure*/
466 ) {
468 
469  TRACE("LPFINDREPLACE=%p\n", pfr);
470 
471  if(!COMDLG32_FR_CheckPartial(pfr, TRUE))
472  return 0;
473 
474  if((pdata = COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data))) == NULL)
475  return 0; /* Error has been set */
476 
477  pdata->user_fr.fra = pfr;
478  pdata->fr = *pfr;
479  pdata->fr.Flags |= FR_WINE_REPLACE;
481 }
482 
483 /***********************************************************************
484  * FindTextW [COMDLG32.@]
485  *
486  * Create a modeless find-text dialog box.
487  *
488  * RETURNS
489  * Window handle to created dialog: Success
490  * NULL: Failure
491  */
493  LPFINDREPLACEW pfr /* [in] Find/replace structure*/
494 ) {
496  DWORD len;
497 
498  TRACE("LPFINDREPLACE=%p\n", pfr);
499 
501  return 0;
502 
504  NULL, 0, NULL, NULL );
505  if((pdata = COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data) + len)) == NULL)
506  return 0; /* Error has been set */
507 
508  pdata->user_fr.frw = pfr;
509  pdata->fr = *(LPFINDREPLACEA)pfr; /* FINDREPLACEx have same size */
510  pdata->fr.Flags |= FR_WINE_UNICODE;
511  pdata->fr.lpstrFindWhat = (LPSTR)(pdata + 1); /* Set string pointer */
513  pdata->fr.lpstrFindWhat, len, NULL, NULL );
515 }
516 
517 /***********************************************************************
518  * ReplaceTextW [COMDLG32.@]
519  *
520  * Create a modeless replace-text dialog box.
521  *
522  * RETURNS
523  * Window handle to created dialog: Success
524  * NULL: Failure
525  */
527  LPFINDREPLACEW pfr /* [in] Find/replace structure*/
528 ) {
530  DWORD len1, len2;
531 
532  TRACE("LPFINDREPLACE=%p\n", pfr);
533 
535  return 0;
536 
537  len1 = WideCharToMultiByte( CP_ACP, 0, pfr->lpstrFindWhat, pfr->wFindWhatLen,
538  NULL, 0, NULL, NULL );
540  NULL, 0, NULL, NULL );
541  if((pdata = COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data) + len1 + len2)) == NULL)
542  return 0; /* Error has been set */
543 
544  pdata->user_fr.frw = pfr;
545  pdata->fr = *(LPFINDREPLACEA)pfr; /* FINDREPLACEx have same size */
546  pdata->fr.Flags |= FR_WINE_REPLACE | FR_WINE_UNICODE;
547  pdata->fr.lpstrFindWhat = (LPSTR)(pdata + 1); /* Set string pointer */
548  pdata->fr.lpstrReplaceWith = pdata->fr.lpstrFindWhat + len1;
549 
551  pdata->fr.lpstrFindWhat, len1, NULL, NULL );
553  pdata->fr.lpstrReplaceWith, len2, NULL, NULL );
555 }
#define FR_FINDNEXT
Definition: commdlg.h:131
LPVOID COMDLG32_AllocMem(int size) __WINE_ALLOC_SIZE(1) DECLSPEC_HIDDEN
Definition: cdlg32.c:100
#define FR_HIDEMATCHCASE
Definition: commdlg.h:133
#define WM_GETTEXTLENGTH
Definition: winuser.h:1601
HANDLE WINAPI RemovePropA(_In_ HWND, _In_ LPCSTR)
#define CDERR_REGISTERMSGFAIL
Definition: cderr.h:17
LPFRHOOKPROC lpfnHook
Definition: commdlg.h:312
#define TRUE
Definition: types.h:120
#define IDOK
Definition: winuser.h:824
DECLSPEC_HIDDEN HINSTANCE COMDLG32_hInstance
Definition: cdlg32.c:42
_In_ ULONG NotifyCode
Definition: winddi.h:4265
#define WM_CONTEXTMENU
Definition: richedit.h:64
#define WideCharToMultiByte
Definition: compat.h:101
#define error(str)
Definition: mkdosfs.c:1605
#define CDERR_LOADRESFAILURE
Definition: cderr.h:12
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define FRERR_BUFFERLENGTHZERO
Definition: cderr.h:39
#define SW_HIDE
Definition: winuser.h:762
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define FR_ENABLETEMPLATEHANDLE
Definition: commdlg.h:130
static HWND COMDLG32_FR_DoFindReplace(COMDLG32_FR_Data *pdata)
Definition: finddlg.c:364
#define CP_ACP
Definition: compat.h:99
HWND WINAPI ReplaceTextW(LPFINDREPLACEW pfr)
Definition: finddlg.c:526
#define EM_SETLIMITTEXT
Definition: winuser.h:1993
#define FINDDLGORD
Definition: dlgs.h:12
#define CDERR_NOHINSTANCE
Definition: cderr.h:9
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
Definition: res.c:155
#define CALLBACK
Definition: compat.h:27
BOOL WINAPI UpdateWindow(_In_ HWND)
LPSTR lpstrFindWhat
Definition: commdlg.h:307
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
#define MAKEINTRESOURCEA(i)
Definition: winuser.h:581
#define HELPMSGSTRINGA
Definition: commdlg.h:20
static DWORD COMDLG32_FR_GetFlags(HWND hDlgWnd)
Definition: finddlg.c:72
#define FR_WINE_REPLACE
Definition: cdlg.h:37
UINT_PTR WPARAM
Definition: windef.h:207
WORD wFindWhatLen
Definition: commdlg.h:309
void Replace(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, LONG radius)
Definition: drawing.cpp:134
#define FINDMSGSTRINGA
Definition: commdlg.h:21
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
int32_t INT_PTR
Definition: typedefs.h:62
char * LPSTR
Definition: xmlstorage.h:182
#define FR_WINE_UNICODE
Definition: cdlg.h:36
WORD wReplaceWithLen
Definition: commdlg.h:310
BOOL WINAPI DestroyWindow(_In_ HWND)
#define psh2
Definition: dlgs.h:113
#define FR_HIDEUPDOWN
Definition: commdlg.h:132
WPARAM wParam
Definition: combotst.c:138
#define FR_NOUPDOWN
Definition: commdlg.h:140
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
Definition: res.c:176
#define FR_ENABLEHOOK
Definition: commdlg.h:128
DWORD Id
#define rad2
Definition: dlgs.h:131
#define FR_REPLACEALL
Definition: commdlg.h:143
#define FR_MASK
Definition: finddlg.c:45
#define CDERR_STRUCTSIZE
Definition: cderr.h:6
#define CDERR_FINDRESFAILURE
Definition: cderr.h:11
#define FR_NOMATCHCASE
Definition: commdlg.h:139
#define chx1
Definition: dlgs.h:31
unsigned int BOOL
Definition: ntddk_ex.h:94
#define chx2
Definition: dlgs.h:32
DWORD Flags
Definition: commdlg.h:306
#define FIXME(fmt,...)
Definition: debug.h:110
#define REPLACEDLGORD
Definition: dlgs.h:13
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
static void COMDLG32_FR_HandleWMCommand(HWND hDlgWnd, COMDLG32_FR_Data *pData, int Id, int NotifyCode)
Definition: finddlg.c:88
const char * LPCSTR
Definition: xmlstorage.h:183
#define WM_SETTEXT
Definition: winuser.h:1599
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
static PROTOCOLDATA * pdata
Definition: protocol.c:157
#define WM_DESTROY
Definition: winuser.h:1591
#define FR_ENABLETEMPLATE
Definition: commdlg.h:129
#define RT_DIALOG
Definition: pedump.c:367
#define CDERR_LOCKRESFAILURE
Definition: cderr.h:13
static UINT HelpMessage
Definition: finddlg.c:43
HWND WINAPI ReplaceTextA(LPFINDREPLACEA pfr)
Definition: finddlg.c:464
#define BM_SETCHECK
Definition: winuser.h:1903
#define FR_MATCHCASE
Definition: commdlg.h:136
#define TRACE(s)
Definition: solgame.cpp:4
#define psh1
Definition: dlgs.h:112
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
HWND WINAPI FindTextW(LPFINDREPLACEW pfr)
Definition: finddlg.c:492
HWND hwndOwner
Definition: commdlg.h:304
#define CDERR_INITIALIZATION
Definition: cderr.h:7
#define WM_CLOSE
Definition: winuser.h:1603
HWND WINAPI CreateDialogIndirectParamA(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define WINAPI
Definition: msvc.h:8
#define BN_CLICKED
Definition: winuser.h:1907
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
#define FR_REPLACE
Definition: commdlg.h:142
#define edt1
Definition: dlgs.h:65
#define CDERR_NOHOOK
Definition: cderr.h:16
#define edt2
Definition: dlgs.h:66
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52
BOOL WINAPI SetPropA(_In_ HWND, _In_ LPCSTR, _In_opt_ HANDLE)
GLenum GLsizei len
Definition: glext.h:6722
#define WM_COMMAND
Definition: winuser.h:1722
#define grp1
Definition: dlgs.h:86
static BOOL COMDLG32_FR_CheckPartial(const FINDREPLACEA *pfr, BOOL Replace)
Definition: finddlg.c:302
#define COMDLG32_Atom
Definition: cdlg.h:27
UINT WINAPI GetDlgItemTextA(HWND hDlg, int nIDDlgItem, LPSTR lpString, int nMaxCount)
Definition: dialog.c:2244
static PEXPLICIT_ACCESSW *static HMODULE hmod
Definition: security.c:141
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
LPSTR lpstrReplaceWith
Definition: commdlg.h:308
#define FR_WHOLEWORD
Definition: commdlg.h:145
#define ERR(fmt,...)
Definition: debug.h:109
DWORD lStructSize
Definition: commdlg.h:303
#define SW_SHOWNORMAL
Definition: winuser.h:764
GLboolean enable
Definition: glext.h:11120
HANDLE WINAPI GetPropA(_In_ HWND, _In_ LPCSTR)
void COMDLG32_SetCommDlgExtendedError(DWORD err) DECLSPEC_HIDDEN
Definition: cdlg32.c:119
HWND WINAPI FindTextA(LPFINDREPLACEA pfr)
Definition: finddlg.c:441
static INT_PTR CALLBACK COMDLG32_FindReplaceDlgProc(HWND hDlgWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
Definition: finddlg.c:177
unsigned int UINT
Definition: ndis.h:50
WINE_DEFAULT_DEBUG_CHANNEL(commdlg)
#define FR_HIDEWHOLEWORD
Definition: commdlg.h:134
#define pshHelp
Definition: dlgs.h:127
static UINT FindReplaceMessage
Definition: finddlg.c:42
#define MultiByteToWideChar
Definition: compat.h:100
#define BST_CHECKED
Definition: winuser.h:197
#define FR_DOWN
Definition: commdlg.h:127
HINSTANCE hInstance
Definition: commdlg.h:305
LRESULT WINAPI SendDlgItemMessageA(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define HIWORD(l)
Definition: typedefs.h:246
char * cleanup(char *str)
Definition: wpickclick.c:99
#define FR_DIALOGTERM
Definition: commdlg.h:126
#define FR_SHOWHELP
Definition: commdlg.h:144
#define CDERR_DIALOGFAILURE
Definition: cderr.h:4
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define IDCANCEL
Definition: winuser.h:825
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
struct FINDREPLACEA * LPFINDREPLACEA
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define rad1
Definition: dlgs.h:130
UINT WINAPI RegisterWindowMessageA(_In_ LPCSTR)
#define FR_NOWHOLEWORD
Definition: commdlg.h:141
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
#define EN_CHANGE
Definition: winuser.h:2004