Jeff Latimer : comctl32: Improve the stub of TaskDialogIndirect to display a simple message box pending a full implementation .
Module: wine Branch: master Commit: f669cca9993645397040f504d2e12eac089d4fc9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f669cca9993645397040f504d2... Author: Jeff Latimer <lats(a)yless4u.com.au> Date: Thu Jul 21 23:00:13 2011 +1000 comctl32: Improve the stub of TaskDialogIndirect to display a simple message box pending a full implementation. --- dlls/comctl32/commctrl.c | 27 ++++++++++++++++++++++++++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index a82b233..e06638c 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -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;
participants (1)
-
Alexandre Julliard