ReactOS 0.4.15-dev-7918-g2a2556c
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#ifndef __REACTOS__
93 pData->user_fr.fra->Flags &= ~FR_MASK; /* Clear return flags */
94 if(pData->fr.Flags & FR_WINE_REPLACE) /* Replace always goes down... */
95 pData->user_fr.fra->Flags |= FR_DOWN;
96#endif
97
99 {
100 switch(Id)
101 {
102 case IDOK: /* Find Next */
103 if(GetDlgItemTextA(hDlgWnd, edt1, pData->fr.lpstrFindWhat, pData->fr.wFindWhatLen) > 0)
104 {
105#ifdef __REACTOS__
106 pData->user_fr.fra->Flags &= ~FR_MASK; /* Clear return flags */
107 if(pData->fr.Flags & FR_WINE_REPLACE) /* Replace always goes down... */
108 pData->user_fr.fra->Flags |= FR_DOWN;
109#endif
110 pData->user_fr.fra->Flags |= COMDLG32_FR_GetFlags(hDlgWnd) | FR_FINDNEXT;
111 if(pData->fr.Flags & FR_WINE_UNICODE)
112 {
113 MultiByteToWideChar( CP_ACP, 0, pData->fr.lpstrFindWhat, -1,
114 pData->user_fr.frw->lpstrFindWhat,
115 0x7fffffff );
116 }
117 else
118 {
119 strcpy(pData->user_fr.fra->lpstrFindWhat, pData->fr.lpstrFindWhat);
120 }
121 SendMessageA(pData->fr.hwndOwner, FindReplaceMessage, 0, (LPARAM)pData->user_fr.fra);
122 }
123 break;
124
125 case IDCANCEL:
126#ifdef __REACTOS__
127 pData->user_fr.fra->Flags &= ~FR_MASK; /* Clear return flags */
128 if(pData->fr.Flags & FR_WINE_REPLACE) /* Replace always goes down... */
129 pData->user_fr.fra->Flags |= FR_DOWN;
130#endif
131 pData->user_fr.fra->Flags |= COMDLG32_FR_GetFlags(hDlgWnd) | FR_DIALOGTERM;
132 SendMessageA(pData->fr.hwndOwner, FindReplaceMessage, 0, (LPARAM)pData->user_fr.fra);
133 DestroyWindow(hDlgWnd);
134 break;
135
136 case psh2: /* Replace All */
138 goto Replace;
139
140 case psh1: /* Replace */
142Replace:
143 if((pData->fr.Flags & FR_WINE_REPLACE)
144 && GetDlgItemTextA(hDlgWnd, edt1, pData->fr.lpstrFindWhat, pData->fr.wFindWhatLen) > 0)
145 {
146 pData->fr.lpstrReplaceWith[0] = 0; /* In case the next GetDlgItemText Fails */
147 GetDlgItemTextA(hDlgWnd, edt2, pData->fr.lpstrReplaceWith, pData->fr.wReplaceWithLen);
148#ifdef __REACTOS__
149 pData->user_fr.fra->Flags &= ~FR_MASK; /* Clear return flags */
150 if(pData->fr.Flags & FR_WINE_REPLACE) /* Replace always goes down... */
151 pData->user_fr.fra->Flags |= FR_DOWN;
152#endif
153 pData->user_fr.fra->Flags |= COMDLG32_FR_GetFlags(hDlgWnd) | flag;
154 if(pData->fr.Flags & FR_WINE_UNICODE)
155 {
156 MultiByteToWideChar( CP_ACP, 0, pData->fr.lpstrFindWhat, -1,
157 pData->user_fr.frw->lpstrFindWhat,
158 0x7fffffff );
159 MultiByteToWideChar( CP_ACP, 0, pData->fr.lpstrReplaceWith, -1,
160 pData->user_fr.frw->lpstrReplaceWith,
161 0x7fffffff );
162 }
163 else
164 {
165 strcpy(pData->user_fr.fra->lpstrFindWhat, pData->fr.lpstrFindWhat);
166 strcpy(pData->user_fr.fra->lpstrReplaceWith, pData->fr.lpstrReplaceWith);
167 }
168 SendMessageA(pData->fr.hwndOwner, FindReplaceMessage, 0, (LPARAM)pData->user_fr.fra);
169 }
170 break;
171
172 case pshHelp:
173#ifdef __REACTOS__
174 pData->user_fr.fra->Flags &= ~FR_MASK; /* Clear return flags */
175 if(pData->fr.Flags & FR_WINE_REPLACE) /* Replace always goes down... */
176 pData->user_fr.fra->Flags |= FR_DOWN;
177#endif
178 pData->user_fr.fra->Flags |= COMDLG32_FR_GetFlags(hDlgWnd);
179 SendMessageA(pData->fr.hwndOwner, HelpMessage, (WPARAM)hDlgWnd, (LPARAM)pData->user_fr.fra);
180 break;
181 }
182 }
183 else if(NotifyCode == EN_CHANGE && Id == edt1)
184 {
185 BOOL enable = SendDlgItemMessageA(hDlgWnd, edt1, WM_GETTEXTLENGTH, 0, 0) > 0;
187 if(pData->fr.Flags & FR_WINE_REPLACE)
188 {
191 }
192 }
193}
194
195/***********************************************************************
196 * COMDLG32_FindReplaceDlgProc [internal]
197 * [Find/Replace]Text32[A/W] window procedure.
198 */
200{
202 INT_PTR retval = TRUE;
203
204 if(iMsg == WM_INITDIALOG)
205 {
207 if(!SetPropA(hDlgWnd, (LPSTR)COMDLG32_Atom, (HANDLE)pdata))
208 {
209 ERR("Could not Set prop; invent a graceful exit?...\n");
210 DestroyWindow(hDlgWnd);
211 return FALSE;
212 }
213 SendDlgItemMessageA(hDlgWnd, edt1, EM_SETLIMITTEXT, pdata->fr.wFindWhatLen, 0);
214 SendDlgItemMessageA(hDlgWnd, edt1, WM_SETTEXT, 0, (LPARAM)pdata->fr.lpstrFindWhat);
215 if(pdata->fr.Flags & FR_WINE_REPLACE)
216 {
217 SendDlgItemMessageA(hDlgWnd, edt2, EM_SETLIMITTEXT, pdata->fr.wReplaceWithLen, 0);
218 SendDlgItemMessageA(hDlgWnd, edt2, WM_SETTEXT, 0, (LPARAM)pdata->fr.lpstrReplaceWith);
219 }
220
221 if(!(pdata->fr.Flags & FR_SHOWHELP))
223 if(pdata->fr.Flags & FR_HIDEUPDOWN)
224 {
225 ShowWindow(GetDlgItem(hDlgWnd, rad1), SW_HIDE);
226 ShowWindow(GetDlgItem(hDlgWnd, rad2), SW_HIDE);
227 ShowWindow(GetDlgItem(hDlgWnd, grp1), SW_HIDE);
228 }
229 else if(pdata->fr.Flags & FR_NOUPDOWN)
230 {
231 EnableWindow(GetDlgItem(hDlgWnd, rad1), FALSE);
232 EnableWindow(GetDlgItem(hDlgWnd, rad2), FALSE);
233 EnableWindow(GetDlgItem(hDlgWnd, grp1), FALSE);
234 }
235 else
236 {
237 SendDlgItemMessageA(hDlgWnd, rad1, BM_SETCHECK, pdata->fr.Flags & FR_DOWN ? 0 : BST_CHECKED, 0);
238 SendDlgItemMessageA(hDlgWnd, rad2, BM_SETCHECK, pdata->fr.Flags & FR_DOWN ? BST_CHECKED : 0, 0);
239 }
240
241 if(pdata->fr.Flags & FR_HIDEMATCHCASE)
242 ShowWindow(GetDlgItem(hDlgWnd, chx2), SW_HIDE);
243 else if(pdata->fr.Flags & FR_NOMATCHCASE)
244 EnableWindow(GetDlgItem(hDlgWnd, chx2), FALSE);
245 else
246 SendDlgItemMessageA(hDlgWnd, chx2, BM_SETCHECK, pdata->fr.Flags & FR_MATCHCASE ? BST_CHECKED : 0, 0);
247
248 if(pdata->fr.Flags & FR_HIDEWHOLEWORD)
249 ShowWindow(GetDlgItem(hDlgWnd, chx1), SW_HIDE);
250 else if(pdata->fr.Flags & FR_NOWHOLEWORD)
251 EnableWindow(GetDlgItem(hDlgWnd, chx1), FALSE);
252 else
253 SendDlgItemMessageA(hDlgWnd, chx1, BM_SETCHECK, pdata->fr.Flags & FR_WHOLEWORD ? BST_CHECKED : 0, 0);
254
255 /* We did the init here, now call the hook if requested */
256
257 /* We do not do ShowWindow if hook exists and is FALSE */
258 /* per MSDN Article Q96135 */
259 if((pdata->fr.Flags & FR_ENABLEHOOK)
260 && ! pdata->fr.lpfnHook(hDlgWnd, iMsg, wParam, (LPARAM) &pdata->fr))
261 return TRUE;
262 ShowWindow(hDlgWnd, SW_SHOWNORMAL);
263 UpdateWindow(hDlgWnd);
264 return TRUE;
265 }
266
267 if(pdata && (pdata->fr.Flags & FR_ENABLEHOOK))
268 {
269 retval = pdata->fr.lpfnHook(hDlgWnd, iMsg, wParam, lParam);
270 }
271 else
272 retval = FALSE;
273
274 if(pdata && !retval)
275 {
276 retval = TRUE;
277 switch(iMsg)
278 {
279 case WM_COMMAND:
281 break;
282
283 case WM_CLOSE:
285 break;
286
287 case WM_HELP:
288 /* Heeeeelp! */
289 FIXME("Got WM_HELP. Who is gonna supply it?\n");
290 break;
291
292 case WM_CONTEXTMENU:
293 /* Heeeeelp! */
294 FIXME("Got WM_CONTEXTMENU. Who is gonna supply it?\n");
295 break;
296 /* FIXME: Handle F1 help */
297
298 default:
299 retval = FALSE; /* We did not handle the message */
300 }
301 }
302
303 /* WM_DESTROY is a special case.
304 * We need to ensure that the allocated memory is freed just before
305 * the dialog is killed. We also need to remove the added prop.
306 */
307 if(iMsg == WM_DESTROY)
308 {
311 }
312
313 return retval;
314}
315
316/***********************************************************************
317 * COMDLG32_FR_CheckPartial [internal]
318 * Check various fault conditions in the supplied parameters that
319 * cause an extended error to be reported.
320 * RETURNS
321 * TRUE: Success
322 * FALSE: Failure
323 */
325 const FINDREPLACEA *pfr, /* [in] Find structure */
326 BOOL Replace /* [in] True if called as replace */
327) {
328 if(!pfr)
329 {
331 return FALSE;
332 }
333
334 if(pfr->lStructSize != sizeof(FINDREPLACEA))
335 {
337 return FALSE;
338 }
339
340 if(!IsWindow(pfr->hwndOwner))
341 {
343 return FALSE;
344 }
345
346 if((pfr->wFindWhatLen < 1 || !pfr->lpstrFindWhat)
347 ||(Replace && !pfr->lpstrReplaceWith))
348 {
350 return FALSE;
351 }
352
354 {
356 return FALSE;
357 }
359 {
361 return FALSE;
362 }
363
364 if((pfr->Flags & FR_ENABLEHOOK) && !pfr->lpfnHook)
365 {
367 return FALSE;
368 }
369
370 if((pfr->Flags & FR_ENABLETEMPLATEHANDLE) && !pfr->hInstance)
371 {
373 return FALSE;
374 }
375
376 return TRUE;
377}
378
379/***********************************************************************
380 * COMDLG32_FR_DoFindReplace [internal]
381 * Actual load and creation of the Find/Replace dialog.
382 * RETURNS
383 * Window handle to created dialog:Success
384 * NULL:Failure
385 */
387 COMDLG32_FR_Data *pdata /* [in] Internal data structure */
388) {
389 HWND hdlgwnd = 0;
390 HGLOBAL loadrc;
391 DWORD error;
392 LPDLGTEMPLATEW rcs;
393
394 TRACE("hInst=%p, Flags=%08x\n", pdata->fr.hInstance, pdata->fr.Flags);
395
396 if(!(pdata->fr.Flags & FR_ENABLETEMPLATEHANDLE))
397 {
399 HRSRC htemplate;
400 if(pdata->fr.Flags & FR_ENABLETEMPLATE)
401 {
402 hmod = pdata->fr.hInstance;
403 if(pdata->fr.Flags & FR_WINE_UNICODE)
404 {
405 htemplate = FindResourceW(hmod, (LPCWSTR)pdata->fr.lpTemplateName, (LPWSTR)RT_DIALOG);
406 }
407 else
408 {
409 htemplate = FindResourceA(hmod, pdata->fr.lpTemplateName, (LPCSTR)RT_DIALOG);
410 }
411 }
412 else
413 {
414 int rcid = pdata->fr.Flags & FR_WINE_REPLACE ? REPLACEDLGORD
415 : FINDDLGORD;
416 htemplate = FindResourceA(hmod, MAKEINTRESOURCEA(rcid), (LPCSTR)RT_DIALOG);
417 }
418 if(!htemplate)
419 {
421 goto cleanup;
422 }
423
424 loadrc = LoadResource(hmod, htemplate);
425 }
426 else
427 {
428 loadrc = pdata->fr.hInstance;
429 }
430
431 if(!loadrc)
432 {
434 goto cleanup;
435 }
436
437 if((rcs = LockResource(loadrc)) == NULL)
438 {
440 goto cleanup;
441 }
442
444 rcs,
445 pdata->fr.hwndOwner,
447 (LPARAM)pdata);
448 if(!hdlgwnd)
449 {
451cleanup:
454 }
455 return hdlgwnd;
456}
457
458/***********************************************************************
459 * FindTextA [COMDLG32.@]
460 *
461 * See FindTextW.
462 */
464 LPFINDREPLACEA pfr /* [in] Find/replace structure*/
465) {
467
468 TRACE("LPFINDREPLACE=%p\n", pfr);
469
471 return 0;
472
473 if((pdata = COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data))) == NULL)
474 return 0; /* Error has been set */
475
476 pdata->user_fr.fra = pfr;
477 pdata->fr = *pfr;
479}
480
481/***********************************************************************
482 * ReplaceTextA [COMDLG32.@]
483 *
484 * See ReplaceTextW.
485 */
487 LPFINDREPLACEA pfr /* [in] Find/replace structure*/
488) {
490
491 TRACE("LPFINDREPLACE=%p\n", pfr);
492
494 return 0;
495
496 if((pdata = COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data))) == NULL)
497 return 0; /* Error has been set */
498
499 pdata->user_fr.fra = pfr;
500 pdata->fr = *pfr;
501 pdata->fr.Flags |= FR_WINE_REPLACE;
503}
504
505/***********************************************************************
506 * FindTextW [COMDLG32.@]
507 *
508 * Create a modeless find-text dialog box.
509 *
510 * RETURNS
511 * Window handle to created dialog: Success
512 * NULL: Failure
513 */
515 LPFINDREPLACEW pfr /* [in] Find/replace structure*/
516) {
518 DWORD len;
519
520 TRACE("LPFINDREPLACE=%p\n", pfr);
521
523 return 0;
524
526 NULL, 0, NULL, NULL );
527 if((pdata = COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data) + len)) == NULL)
528 return 0; /* Error has been set */
529
530 pdata->user_fr.frw = pfr;
531 pdata->fr = *(LPFINDREPLACEA)pfr; /* FINDREPLACEx have same size */
532 pdata->fr.Flags |= FR_WINE_UNICODE;
533 pdata->fr.lpstrFindWhat = (LPSTR)(pdata + 1); /* Set string pointer */
535 pdata->fr.lpstrFindWhat, len, NULL, NULL );
537}
538
539/***********************************************************************
540 * ReplaceTextW [COMDLG32.@]
541 *
542 * Create a modeless replace-text dialog box.
543 *
544 * RETURNS
545 * Window handle to created dialog: Success
546 * NULL: Failure
547 */
549 LPFINDREPLACEW pfr /* [in] Find/replace structure*/
550) {
552 DWORD len1, len2;
553
554 TRACE("LPFINDREPLACE=%p\n", pfr);
555
557 return 0;
558
560 NULL, 0, NULL, NULL );
562 NULL, 0, NULL, NULL );
563 if((pdata = COMDLG32_AllocMem(sizeof(COMDLG32_FR_Data) + len1 + len2)) == NULL)
564 return 0; /* Error has been set */
565
566 pdata->user_fr.frw = pfr;
567 pdata->fr = *(LPFINDREPLACEA)pfr; /* FINDREPLACEx have same size */
569 pdata->fr.lpstrFindWhat = (LPSTR)(pdata + 1); /* Set string pointer */
570 pdata->fr.lpstrReplaceWith = pdata->fr.lpstrFindWhat + len1;
571
573 pdata->fr.lpstrFindWhat, len1, NULL, NULL );
575 pdata->fr.lpstrReplaceWith, len2, NULL, NULL );
577}
DWORD Id
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: debug.h:111
#define ERR(fmt,...)
Definition: debug.h:110
#define CDERR_REGISTERMSGFAIL
Definition: cderr.h:17
#define CDERR_NOHINSTANCE
Definition: cderr.h:9
#define CDERR_NOHOOK
Definition: cderr.h:16
#define CDERR_INITIALIZATION
Definition: cderr.h:7
#define CDERR_LOADRESFAILURE
Definition: cderr.h:12
#define CDERR_FINDRESFAILURE
Definition: cderr.h:11
#define FRERR_BUFFERLENGTHZERO
Definition: cderr.h:39
#define CDERR_LOCKRESFAILURE
Definition: cderr.h:13
#define CDERR_DIALOGFAILURE
Definition: cderr.h:4
#define CDERR_STRUCTSIZE
Definition: cderr.h:6
DECLSPEC_HIDDEN HINSTANCE COMDLG32_hInstance
Definition: cdlg32.c:42
#define FR_WINE_UNICODE
Definition: cdlg.h:39
void COMDLG32_SetCommDlgExtendedError(DWORD err) DECLSPEC_HIDDEN
Definition: cdlg32.c:128
#define FR_WINE_REPLACE
Definition: cdlg.h:40
LPVOID COMDLG32_AllocMem(int size) __WINE_ALLOC_SIZE(1) DECLSPEC_HIDDEN
Definition: cdlg32.c:109
#define COMDLG32_Atom
Definition: cdlg.h:27
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define FR_WHOLEWORD
Definition: commdlg.h:145
#define FR_NOUPDOWN
Definition: commdlg.h:140
#define FR_ENABLETEMPLATEHANDLE
Definition: commdlg.h:130
#define FR_REPLACE
Definition: commdlg.h:142
#define FR_DIALOGTERM
Definition: commdlg.h:126
#define FR_REPLACEALL
Definition: commdlg.h:143
#define FR_HIDEWHOLEWORD
Definition: commdlg.h:134
#define FR_SHOWHELP
Definition: commdlg.h:144
#define FINDMSGSTRINGA
Definition: commdlg.h:21
#define FR_NOWHOLEWORD
Definition: commdlg.h:141
#define FR_HIDEMATCHCASE
Definition: commdlg.h:133
struct FINDREPLACEA * LPFINDREPLACEA
#define FR_MATCHCASE
Definition: commdlg.h:136
#define FR_NOMATCHCASE
Definition: commdlg.h:139
#define FR_ENABLEHOOK
Definition: commdlg.h:128
#define FR_ENABLETEMPLATE
Definition: commdlg.h:129
#define HELPMSGSTRINGA
Definition: commdlg.h:20
#define FR_DOWN
Definition: commdlg.h:127
#define FR_HIDEUPDOWN
Definition: commdlg.h:132
#define FR_FINDNEXT
Definition: commdlg.h:131
#define psh1
Definition: dlgs.h:112
#define pshHelp
Definition: dlgs.h:127
#define psh2
Definition: dlgs.h:113
#define rad2
Definition: dlgs.h:131
#define edt1
Definition: dlgs.h:65
#define FINDDLGORD
Definition: dlgs.h:12
#define grp1
Definition: dlgs.h:86
#define edt2
Definition: dlgs.h:66
#define chx1
Definition: dlgs.h:31
#define chx2
Definition: dlgs.h:32
#define rad1
Definition: dlgs.h:130
#define REPLACEDLGORD
Definition: dlgs.h:13
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static DWORD COMDLG32_FR_GetFlags(HWND hDlgWnd)
Definition: finddlg.c:72
static HWND COMDLG32_FR_DoFindReplace(COMDLG32_FR_Data *pdata)
Definition: finddlg.c:386
HWND WINAPI ReplaceTextA(LPFINDREPLACEA pfr)
Definition: finddlg.c:486
HWND WINAPI FindTextW(LPFINDREPLACEW pfr)
Definition: finddlg.c:514
static void COMDLG32_FR_HandleWMCommand(HWND hDlgWnd, COMDLG32_FR_Data *pData, int Id, int NotifyCode)
Definition: finddlg.c:88
static INT_PTR CALLBACK COMDLG32_FindReplaceDlgProc(HWND hDlgWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
Definition: finddlg.c:199
static UINT HelpMessage
Definition: finddlg.c:43
HWND WINAPI FindTextA(LPFINDREPLACEA pfr)
Definition: finddlg.c:463
static UINT FindReplaceMessage
Definition: finddlg.c:42
static BOOL COMDLG32_FR_CheckPartial(const FINDREPLACEA *pfr, BOOL Replace)
Definition: finddlg.c:324
HWND WINAPI ReplaceTextW(LPFINDREPLACEW pfr)
Definition: finddlg.c:548
#define CP_ACP
Definition: compat.h:109
#define CALLBACK
Definition: compat.h:35
#define WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
static void cleanup(void)
Definition: main.c:1335
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
Definition: res.c:176
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
Definition: res.c:155
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
void Replace(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, LONG radius)
Definition: drawing.cpp:132
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
GLboolean enable
Definition: glext.h:11120
GLenum GLsizei len
Definition: glext.h:6722
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
#define error(str)
Definition: mkdosfs.c:1605
static PEXPLICIT_ACCESSW *static HMODULE hmod
Definition: security.c:143
static PROTOCOLDATA * pdata
Definition: protocol.c:158
unsigned int UINT
Definition: ndis.h:50
#define LOWORD(l)
Definition: pedump.c:82
#define RT_DIALOG
Definition: pedump.c:367
#define WM_CONTEXTMENU
Definition: richedit.h:64
#define TRACE(s)
Definition: solgame.cpp:4
DWORD lStructSize
Definition: commdlg.h:303
LPSTR lpstrFindWhat
Definition: commdlg.h:307
HINSTANCE hInstance
Definition: commdlg.h:305
LPSTR lpstrReplaceWith
Definition: commdlg.h:308
LPFRHOOKPROC lpfnHook
Definition: commdlg.h:312
DWORD Flags
Definition: commdlg.h:306
WORD wFindWhatLen
Definition: commdlg.h:309
HWND hwndOwner
Definition: commdlg.h:304
WORD wReplaceWithLen
Definition: commdlg.h:323
WORD wFindWhatLen
Definition: commdlg.h:322
LPWSTR lpstrReplaceWith
Definition: commdlg.h:321
LPWSTR lpstrFindWhat
Definition: commdlg.h:320
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
int32_t INT_PTR
Definition: typedefs.h:64
#define HIWORD(l)
Definition: typedefs.h:247
UINT WINAPI GetDlgItemTextA(HWND hDlg, int nIDDlgItem, LPSTR lpString, int nMaxCount)
Definition: dialog.c:2245
_In_ ULONG NotifyCode
Definition: winddi.h:4265
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define SW_SHOWNORMAL
Definition: winuser.h:770
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define WM_GETTEXTLENGTH
Definition: winuser.h:1619
#define SW_HIDE
Definition: winuser.h:768
#define WM_CLOSE
Definition: winuser.h:1621
UINT WINAPI RegisterWindowMessageA(_In_ LPCSTR)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
HANDLE WINAPI GetPropA(_In_ HWND, _In_ LPCSTR)
#define IDCANCEL
Definition: winuser.h:831
BOOL WINAPI SetPropA(_In_ HWND, _In_ LPCSTR, _In_opt_ HANDLE)
#define WM_COMMAND
Definition: winuser.h:1740
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_INITDIALOG
Definition: winuser.h:1739
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:830
#define BM_SETCHECK
Definition: winuser.h:1921
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
#define WM_SETTEXT
Definition: winuser.h:1617
#define EM_SETLIMITTEXT
Definition: winuser.h:2011
HWND WINAPI CreateDialogIndirectParamA(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI UpdateWindow(_In_ HWND)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define MAKEINTRESOURCEA(i)
Definition: winuser.h:581
#define BN_CLICKED
Definition: winuser.h:1925
#define WM_DESTROY
Definition: winuser.h:1609
LRESULT WINAPI SendDlgItemMessageA(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI DestroyWindow(_In_ HWND)
HANDLE WINAPI RemovePropA(_In_ HWND, _In_ LPCSTR)
#define BST_CHECKED
Definition: winuser.h:197
#define EN_CHANGE
Definition: winuser.h:2022
const char * LPCSTR
Definition: xmlstorage.h:183
char * LPSTR
Definition: xmlstorage.h:182
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185