comctl32: Improve the stub of TaskDialogIndirect to display a simple message box pending a full implementation.

This commit is contained in:
Jeff Latimer 2011-07-21 23:00:13 +10:00 committed by Alexandre Julliard
parent d1862e473b
commit f669cca999

View File

@ -1696,9 +1696,34 @@ int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *rect, DWORD
HRESULT WINAPI TaskDialogIndirect(const TASKDIALOGCONFIG *pTaskConfig, int *pnButton,
int *pnRadioButton, BOOL *pfVerificationFlagChecked)
{
UINT uType = 0;
INT ret;
FIXME("%p, %p, %p, %p\n", pTaskConfig, pnButton, pnRadioButton, pfVerificationFlagChecked);
if (pnButton) *pnButton = IDYES;
if (pTaskConfig->dwCommonButtons & TDCBF_YES_BUTTON &&
pTaskConfig->dwCommonButtons & TDCBF_NO_BUTTON &&
pTaskConfig->dwCommonButtons & TDCBF_CANCEL_BUTTON)
uType |= MB_YESNOCANCEL;
else
if (pTaskConfig->dwCommonButtons & TDCBF_YES_BUTTON &&
pTaskConfig->dwCommonButtons & TDCBF_NO_BUTTON)
uType |= MB_YESNO;
else
if (pTaskConfig->dwCommonButtons & TDCBF_RETRY_BUTTON &&
pTaskConfig->dwCommonButtons & TDCBF_CANCEL_BUTTON)
uType |= MB_RETRYCANCEL;
else
if (pTaskConfig->dwCommonButtons & TDCBF_OK_BUTTON &&
pTaskConfig->dwCommonButtons & TDCBF_CANCEL_BUTTON)
uType |= MB_OKCANCEL;
else
if (pTaskConfig->dwCommonButtons & TDCBF_OK_BUTTON)
uType |= MB_OK;
ret = MessageBoxW(pTaskConfig->hwndParent, pTaskConfig->pszMainInstruction,
pTaskConfig->pszWindowTitle, uType);
FIXME("dwCommonButtons=%x uType=%x ret=%x\n", pTaskConfig->dwCommonButtons, uType, ret);
if (pnButton) *pnButton = ret;
if (pnRadioButton) *pnRadioButton = pTaskConfig->nDefaultButton;
if (pfVerificationFlagChecked) *pfVerificationFlagChecked = TRUE;
return S_OK;