Commit 80d80c66 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

comdlg32: Constify some variables.

parent 1b2a2943
...@@ -228,7 +228,7 @@ HWND16 WINAPI ReplaceText16( SEGPTR find ) ...@@ -228,7 +228,7 @@ HWND16 WINAPI ReplaceText16( SEGPTR find )
* FINDDLG_WMInitDialog [internal] * FINDDLG_WMInitDialog [internal]
*/ */
static LRESULT FINDDLG_WMInitDialog(HWND hWnd, LPARAM lParam, LPDWORD lpFlags, static LRESULT FINDDLG_WMInitDialog(HWND hWnd, LPARAM lParam, LPDWORD lpFlags,
LPSTR lpstrFindWhat, BOOL fUnicode) LPCSTR lpstrFindWhat, BOOL fUnicode)
{ {
SetWindowLongPtrW(hWnd, DWLP_USER, lParam); SetWindowLongPtrW(hWnd, DWLP_USER, lParam);
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM); *lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);
...@@ -237,7 +237,7 @@ static LRESULT FINDDLG_WMInitDialog(HWND hWnd, LPARAM lParam, LPDWORD lpFlags, ...@@ -237,7 +237,7 @@ static LRESULT FINDDLG_WMInitDialog(HWND hWnd, LPARAM lParam, LPDWORD lpFlags,
* FindNext (IDOK) button. Only after typing some text, the button should be * FindNext (IDOK) button. Only after typing some text, the button should be
* enabled. * enabled.
*/ */
if (fUnicode) SetDlgItemTextW(hWnd, edt1, (LPWSTR)lpstrFindWhat); if (fUnicode) SetDlgItemTextW(hWnd, edt1, (LPCWSTR)lpstrFindWhat);
else SetDlgItemTextA(hWnd, edt1, lpstrFindWhat); else SetDlgItemTextA(hWnd, edt1, lpstrFindWhat);
CheckRadioButton(hWnd, rad1, rad2, (*lpFlags & FR_DOWN) ? rad2 : rad1); CheckRadioButton(hWnd, rad1, rad2, (*lpFlags & FR_DOWN) ? rad2 : rad1);
if (*lpFlags & (FR_HIDEUPDOWN | FR_NOUPDOWN)) { if (*lpFlags & (FR_HIDEUPDOWN | FR_NOUPDOWN)) {
...@@ -341,8 +341,8 @@ BOOL16 CALLBACK FindTextDlgProc16(HWND16 hWnd16, UINT16 wMsg, WPARAM16 wParam, ...@@ -341,8 +341,8 @@ BOOL16 CALLBACK FindTextDlgProc16(HWND16 hWnd16, UINT16 wMsg, WPARAM16 wParam,
* REPLACEDLG_WMInitDialog [internal] * REPLACEDLG_WMInitDialog [internal]
*/ */
static LRESULT REPLACEDLG_WMInitDialog(HWND hWnd, LPARAM lParam, static LRESULT REPLACEDLG_WMInitDialog(HWND hWnd, LPARAM lParam,
LPDWORD lpFlags, LPSTR lpstrFindWhat, LPDWORD lpFlags, LPCSTR lpstrFindWhat,
LPSTR lpstrReplaceWith, BOOL fUnicode) LPCSTR lpstrReplaceWith, BOOL fUnicode)
{ {
SetWindowLongPtrW(hWnd, DWLP_USER, lParam); SetWindowLongPtrW(hWnd, DWLP_USER, lParam);
*lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM); *lpFlags &= ~(FR_FINDNEXT | FR_REPLACE | FR_REPLACEALL | FR_DIALOGTERM);
...@@ -353,8 +353,8 @@ static LRESULT REPLACEDLG_WMInitDialog(HWND hWnd, LPARAM lParam, ...@@ -353,8 +353,8 @@ static LRESULT REPLACEDLG_WMInitDialog(HWND hWnd, LPARAM lParam,
*/ */
if (fUnicode) if (fUnicode)
{ {
SetDlgItemTextW(hWnd, edt1, (LPWSTR)lpstrFindWhat); SetDlgItemTextW(hWnd, edt1, (LPCWSTR)lpstrFindWhat);
SetDlgItemTextW(hWnd, edt2, (LPWSTR)lpstrReplaceWith); SetDlgItemTextW(hWnd, edt2, (LPCWSTR)lpstrReplaceWith);
} else } else
{ {
SetDlgItemTextA(hWnd, edt1, lpstrFindWhat); SetDlgItemTextA(hWnd, edt1, lpstrFindWhat);
......
...@@ -299,8 +299,8 @@ static INT_PTR CALLBACK COMDLG32_FindReplaceDlgProc(HWND hDlgWnd, UINT iMsg, WPA ...@@ -299,8 +299,8 @@ static INT_PTR CALLBACK COMDLG32_FindReplaceDlgProc(HWND hDlgWnd, UINT iMsg, WPA
* FALSE: Failure * FALSE: Failure
*/ */
static BOOL COMDLG32_FR_CheckPartial( static BOOL COMDLG32_FR_CheckPartial(
LPFINDREPLACEA pfr, /* [in] Find structure */ const FINDREPLACEA *pfr, /* [in] Find structure */
BOOL Replace /* [in] True if called as replace */ BOOL Replace /* [in] True if called as replace */
) { ) {
if(!pfr) if(!pfr)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment