Commit 9e3ebed4 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/taskdialog: Added TaskDialog() export.

parent 15c7e654
......@@ -61,6 +61,7 @@
340 stdcall -ordinal DPA_CreateEx(long long)
341 stdcall -noname SendNotify(long long long ptr)
342 stdcall -noname SendNotifyEx(long long long ptr long)
344 stdcall -ordinal TaskDialog(long long wstr wstr wstr long wstr ptr)
345 stdcall -ordinal TaskDialogIndirect(ptr ptr ptr ptr)
350 stdcall -noname -private StrChrA(str long)
351 stdcall -noname -private StrRChrA(str str long)
......
......@@ -22,6 +22,8 @@
#include <stdarg.h>
#include <string.h>
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
......@@ -384,3 +386,26 @@ HRESULT WINAPI TaskDialogIndirect(const TASKDIALOGCONFIG *taskconfig, int *butto
return S_OK;
}
/***********************************************************************
* TaskDialog [COMCTL32.@]
*/
HRESULT WINAPI TaskDialog(HWND owner, HINSTANCE hinst, const WCHAR *title, const WCHAR *main_instruction,
const WCHAR *content, TASKDIALOG_COMMON_BUTTON_FLAGS common_buttons, const WCHAR *icon, int *button)
{
TASKDIALOGCONFIG taskconfig;
TRACE("%p, %p, %s, %s, %s, %#x, %s, %p\n", owner, hinst, debugstr_w(title), debugstr_w(main_instruction),
debugstr_w(content), common_buttons, debugstr_w(icon), button);
memset(&taskconfig, 0, sizeof(taskconfig));
taskconfig.cbSize = sizeof(taskconfig);
taskconfig.hwndParent = owner;
taskconfig.hInstance = hinst;
taskconfig.dwCommonButtons = common_buttons;
taskconfig.pszWindowTitle = title;
taskconfig.u.pszMainIcon = icon;
taskconfig.pszMainInstruction = main_instruction;
taskconfig.pszContent = content;
return TaskDialogIndirect(&taskconfig, button, NULL, NULL);
}
......@@ -28,6 +28,8 @@
#include "v6util.h"
static HRESULT (WINAPI *pTaskDialogIndirect)(const TASKDIALOGCONFIG *, int *, int *, BOOL *);
static HRESULT (WINAPI *pTaskDialog)(HWND, HINSTANCE, const WCHAR *, const WCHAR *, const WCHAR *,
TASKDIALOG_COMMON_BUTTON_FLAGS, const WCHAR *, int *);
START_TEST(taskdialog)
{
......@@ -50,6 +52,12 @@ START_TEST(taskdialog)
return;
}
pTaskDialog = (void *)GetProcAddress(hinst, "TaskDialog");
ptr_ordinal = GetProcAddress(hinst, (const char *)344);
ok(pTaskDialog == ptr_ordinal, "got wrong pointer for ordinal 344, %p expected %p\n",
ptr_ordinal, pTaskDialog);
ptr_ordinal = GetProcAddress(hinst, (const char *)345);
ok(pTaskDialogIndirect == ptr_ordinal, "got wrong pointer for ordinal 345, %p expected %p\n",
ptr_ordinal, pTaskDialogIndirect);
......
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