ReactOS 0.4.15-dev-8131-g4988de4
finddlg.c File Reference
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "wingdi.h"
#include "winuser.h"
#include "commdlg.h"
#include "cderr.h"
#include "dlgs.h"
#include "wine/debug.h"
#include "wine/heap.h"
#include "cdlg.h"
Include dependency graph for finddlg.c:

Go to the source code of this file.

Macros

#define FR_MASK   (FR_DOWN | FR_MATCHCASE | FR_WHOLEWORD | FR_REPLACEALL | FR_REPLACE | FR_FINDNEXT | FR_DIALOGTERM)
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (commdlg)
 
static DWORD COMDLG32_FR_GetFlags (HWND hDlgWnd)
 
static void COMDLG32_FR_HandleWMCommand (HWND hDlgWnd, COMDLG32_FR_Data *pData, int Id, int NotifyCode)
 
static INT_PTR CALLBACK COMDLG32_FindReplaceDlgProc (HWND hDlgWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
 
static BOOL COMDLG32_FR_CheckPartial (const FINDREPLACEA *pfr, BOOL Replace)
 
static HWND COMDLG32_FR_DoFindReplace (COMDLG32_FR_Data *pdata)
 
HWND WINAPI FindTextA (LPFINDREPLACEA pfr)
 
HWND WINAPI ReplaceTextA (LPFINDREPLACEA pfr)
 
HWND WINAPI FindTextW (LPFINDREPLACEW pfr)
 
HWND WINAPI ReplaceTextW (LPFINDREPLACEW pfr)
 

Variables

static UINT FindReplaceMessage
 
static UINT HelpMessage
 

Macro Definition Documentation

◆ FR_MASK

Definition at line 45 of file finddlg.c.

Function Documentation

◆ COMDLG32_FindReplaceDlgProc()

static INT_PTR CALLBACK COMDLG32_FindReplaceDlgProc ( HWND  hDlgWnd,
UINT  iMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 199 of file finddlg.c.

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}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define FIXME(fmt,...)
Definition: debug.h:114
#define ERR(fmt,...)
Definition: debug.h:113
#define FR_WINE_REPLACE
Definition: cdlg.h:40
#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_HIDEWHOLEWORD
Definition: commdlg.h:134
#define FR_SHOWHELP
Definition: commdlg.h:144
#define FR_NOWHOLEWORD
Definition: commdlg.h:141
#define FR_HIDEMATCHCASE
Definition: commdlg.h:133
#define FR_MATCHCASE
Definition: commdlg.h:136
#define FR_NOMATCHCASE
Definition: commdlg.h:139
#define FR_ENABLEHOOK
Definition: commdlg.h:128
#define FR_DOWN
Definition: commdlg.h:127
#define FR_HIDEUPDOWN
Definition: commdlg.h:132
#define pshHelp
Definition: dlgs.h:127
#define rad2
Definition: dlgs.h:131
#define edt1
Definition: dlgs.h:65
#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 TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static void COMDLG32_FR_HandleWMCommand(HWND hDlgWnd, COMDLG32_FR_Data *pData, int Id, int NotifyCode)
Definition: finddlg.c:88
static PROTOCOLDATA * pdata
Definition: protocol.c:158
#define LOWORD(l)
Definition: pedump.c:82
#define WM_CONTEXTMENU
Definition: richedit.h:64
int32_t INT_PTR
Definition: typedefs.h:64
#define HIWORD(l)
Definition: typedefs.h:247
LONG_PTR LPARAM
Definition: windef.h:208
#define SW_SHOWNORMAL
Definition: winuser.h:770
#define SW_HIDE
Definition: winuser.h:768
#define WM_CLOSE
Definition: winuser.h:1621
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
#define WM_INITDIALOG
Definition: winuser.h:1739
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define BM_SETCHECK
Definition: winuser.h:1921
#define WM_SETTEXT
Definition: winuser.h:1617
#define EM_SETLIMITTEXT
Definition: winuser.h:2011
BOOL WINAPI UpdateWindow(_In_ HWND)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#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
char * LPSTR
Definition: xmlstorage.h:182

Referenced by COMDLG32_FR_DoFindReplace().

◆ COMDLG32_FR_CheckPartial()

static BOOL COMDLG32_FR_CheckPartial ( const FINDREPLACEA pfr,
BOOL  Replace 
)
static

Definition at line 324 of file finddlg.c.

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}
#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 FRERR_BUFFERLENGTHZERO
Definition: cderr.h:39
#define CDERR_DIALOGFAILURE
Definition: cderr.h:4
#define CDERR_STRUCTSIZE
Definition: cderr.h:6
void COMDLG32_SetCommDlgExtendedError(DWORD err) DECLSPEC_HIDDEN
Definition: cdlg32.c:128
#define FR_ENABLETEMPLATEHANDLE
Definition: commdlg.h:130
#define FINDMSGSTRINGA
Definition: commdlg.h:21
#define HELPMSGSTRINGA
Definition: commdlg.h:20
static UINT HelpMessage
Definition: finddlg.c:43
static UINT FindReplaceMessage
Definition: finddlg.c:42
void Replace(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, LONG radius)
Definition: drawing.cpp:132
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
BOOL WINAPI IsWindow(_In_opt_ HWND)
UINT WINAPI RegisterWindowMessageA(_In_ LPCSTR)

Referenced by FindTextA(), FindTextW(), ReplaceTextA(), and ReplaceTextW().

◆ COMDLG32_FR_DoFindReplace()

static HWND COMDLG32_FR_DoFindReplace ( COMDLG32_FR_Data pdata)
static

Definition at line 386 of file finddlg.c.

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}
#define CDERR_LOADRESFAILURE
Definition: cderr.h:12
#define CDERR_FINDRESFAILURE
Definition: cderr.h:11
#define CDERR_LOCKRESFAILURE
Definition: cderr.h:13
DECLSPEC_HIDDEN HINSTANCE COMDLG32_hInstance
Definition: cdlg32.c:42
#define FR_WINE_UNICODE
Definition: cdlg.h:39
#define FR_ENABLETEMPLATE
Definition: commdlg.h:129
#define FINDDLGORD
Definition: dlgs.h:12
#define REPLACEDLGORD
Definition: dlgs.h:13
#define NULL
Definition: types.h:112
static INT_PTR CALLBACK COMDLG32_FindReplaceDlgProc(HWND hDlgWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
Definition: finddlg.c:199
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
unsigned long DWORD
Definition: ntddk_ex.h:95
#define error(str)
Definition: mkdosfs.c:1605
static PEXPLICIT_ACCESSW *static HMODULE hmod
Definition: security.c:143
#define RT_DIALOG
Definition: pedump.c:367
#define TRACE(s)
Definition: solgame.cpp:4
HWND WINAPI CreateDialogIndirectParamA(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define MAKEINTRESOURCEA(i)
Definition: winuser.h:581
const char * LPCSTR
Definition: xmlstorage.h:183
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by FindTextA(), FindTextW(), ReplaceTextA(), and ReplaceTextW().

◆ COMDLG32_FR_GetFlags()

static DWORD COMDLG32_FR_GetFlags ( HWND  hDlgWnd)
static

Definition at line 72 of file finddlg.c.

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}
GLbitfield flags
Definition: glext.h:7161
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)

Referenced by COMDLG32_FR_HandleWMCommand().

◆ COMDLG32_FR_HandleWMCommand()

static void COMDLG32_FR_HandleWMCommand ( HWND  hDlgWnd,
COMDLG32_FR_Data pData,
int  Id,
int  NotifyCode 
)
static

Definition at line 88 of file finddlg.c.

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}
DWORD Id
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define FR_REPLACE
Definition: commdlg.h:142
#define FR_DIALOGTERM
Definition: commdlg.h:126
#define FR_REPLACEALL
Definition: commdlg.h:143
#define FR_FINDNEXT
Definition: commdlg.h:131
#define psh1
Definition: dlgs.h:112
#define psh2
Definition: dlgs.h:113
static DWORD COMDLG32_FR_GetFlags(HWND hDlgWnd)
Definition: finddlg.c:72
#define CP_ACP
Definition: compat.h:109
#define MultiByteToWideChar
Definition: compat.h:110
unsigned int BOOL
Definition: ntddk_ex.h:94
GLboolean enable
Definition: glext.h:11120
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
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
UINT WINAPI GetDlgItemTextA(HWND hDlg, int nIDDlgItem, LPSTR lpString, int nMaxCount)
Definition: dialog.c:2245
_In_ ULONG NotifyCode
Definition: winddi.h:4265
UINT_PTR WPARAM
Definition: windef.h:207
#define WM_GETTEXTLENGTH
Definition: winuser.h:1619
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDOK
Definition: winuser.h:830
#define EN_CHANGE
Definition: winuser.h:2022

Referenced by COMDLG32_FindReplaceDlgProc().

◆ FindTextA()

HWND WINAPI FindTextA ( LPFINDREPLACEA  pfr)

Definition at line 463 of file finddlg.c.

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}
LPVOID COMDLG32_AllocMem(int size) __WINE_ALLOC_SIZE(1) DECLSPEC_HIDDEN
Definition: cdlg32.c:109
static HWND COMDLG32_FR_DoFindReplace(COMDLG32_FR_Data *pdata)
Definition: finddlg.c:386
static BOOL COMDLG32_FR_CheckPartial(const FINDREPLACEA *pfr, BOOL Replace)
Definition: finddlg.c:324

◆ FindTextW()

HWND WINAPI FindTextW ( LPFINDREPLACEW  pfr)

Definition at line 514 of file finddlg.c.

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}
struct FINDREPLACEA * LPFINDREPLACEA
#define WideCharToMultiByte
Definition: compat.h:111
GLenum GLsizei len
Definition: glext.h:6722

Referenced by dialog_find().

◆ ReplaceTextA()

HWND WINAPI ReplaceTextA ( LPFINDREPLACEA  pfr)

Definition at line 486 of file finddlg.c.

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}

◆ ReplaceTextW()

HWND WINAPI ReplaceTextW ( LPFINDREPLACEW  pfr)

Definition at line 548 of file finddlg.c.

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}
WORD wReplaceWithLen
Definition: commdlg.h:310

Referenced by dialog_find().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( commdlg  )

Variable Documentation

◆ FindReplaceMessage

UINT FindReplaceMessage
static

Definition at line 42 of file finddlg.c.

Referenced by COMDLG32_FR_CheckPartial(), and COMDLG32_FR_HandleWMCommand().

◆ HelpMessage

UINT HelpMessage
static

Definition at line 43 of file finddlg.c.

Referenced by COMDLG32_FR_CheckPartial(), and COMDLG32_FR_HandleWMCommand().