Commit 68e0d64d authored by Guy L. Albertelli's avatar Guy L. Albertelli Committed by Alexandre Julliard

- Correct check for minimum buffer length.

- Correct cases where ShowWindow is done/not done.
parent 2fb5dee6
...@@ -207,13 +207,14 @@ static BOOL CALLBACK COMDLG32_FindReplaceDlgProc(HWND hDlgWnd, UINT iMsg, WPARAM ...@@ -207,13 +207,14 @@ static BOOL CALLBACK COMDLG32_FindReplaceDlgProc(HWND hDlgWnd, UINT iMsg, WPARAM
SendDlgItemMessageA(hDlgWnd, chx1, BM_SETCHECK, pdata->fr.Flags & FR_WHOLEWORD ? BST_CHECKED : 0, 0); SendDlgItemMessageA(hDlgWnd, chx1, BM_SETCHECK, pdata->fr.Flags & FR_WHOLEWORD ? BST_CHECKED : 0, 0);
/* We did the init here, now call the hook if requested */ /* We did the init here, now call the hook if requested */
/* We do not do ShowWindow if hook exists and is FALSE */
/* per MSDN Article Q96135 */
if((pdata->fr.Flags & FR_ENABLEHOOK) if((pdata->fr.Flags & FR_ENABLEHOOK)
&& pdata->fr.lpfnHook(hDlgWnd, iMsg, wParam, pdata->fr.lCustData)) && ! pdata->fr.lpfnHook(hDlgWnd, iMsg, wParam, pdata->fr.lCustData))
{ return TRUE;
ShowWindow(hDlgWnd, SW_SHOWNORMAL); ShowWindow(hDlgWnd, SW_SHOWNORMAL);
UpdateWindow(hDlgWnd); UpdateWindow(hDlgWnd);
}
/* else the caller is responsible for showing */
return TRUE; return TRUE;
} }
...@@ -296,8 +297,8 @@ static BOOL COMDLG32_FR_CheckPartial( ...@@ -296,8 +297,8 @@ static BOOL COMDLG32_FR_CheckPartial(
return FALSE; return FALSE;
} }
if((pfr->wFindWhatLen < 80 || !pfr->lpstrFindWhat) if((pfr->wFindWhatLen < 1 || !pfr->lpstrFindWhat)
||(Replace && (pfr->wReplaceWithLen < 80 || !pfr->lpstrReplaceWith))) ||(Replace && (pfr->wReplaceWithLen < 1 || !pfr->lpstrReplaceWith)))
{ {
COMDLG32_SetCommDlgExtendedError(FRERR_BUFFERLENGTHZERO); COMDLG32_SetCommDlgExtendedError(FRERR_BUFFERLENGTHZERO);
return FALSE; return FALSE;
......
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