diff --git a/redo/windows/stddialogs.c b/redo/windows/stddialogs.c index cebc02b8..eeeb9cf6 100644 --- a/redo/windows/stddialogs.c +++ b/redo/windows/stddialogs.c @@ -62,27 +62,17 @@ char *uiSaveFile(void) FOS_OVERWRITEPROMPT | FOS_NOCHANGEDIR | FOS_ALLNONSTORAGEITEMS | FOS_NOVALIDATE | FOS_SHAREAWARE | FOS_NOTESTFILECREATE | FOS_NODEREFERENCELINKS | FOS_FORCESHOWHIDDEN | FOS_DEFAULTNOMINIMODE); } -// TODO MinGW-w64 4.0.0 doesn't have the Task Dialog functions in its .lib files -HRESULT (*WINAPI fv_TaskDialog)(_In_opt_ HWND hwndOwner, _In_opt_ HINSTANCE hInstance, _In_opt_ PCWSTR pszWindowTitle, _In_opt_ PCWSTR pszMainInstruction, _In_opt_ PCWSTR pszContent, TASKDIALOG_COMMON_BUTTON_FLAGS dwCommonButtons, _In_opt_ PCWSTR pszIcon, int *pnButton) = NULL; - static void msgbox(const char *title, const char *description, TASKDIALOG_COMMON_BUTTON_FLAGS buttons, PCWSTR icon) { WCHAR *wtitle, *wdescription; HWND dialogHelper; HRESULT hr; - if (fv_TaskDialog == NULL) { - HANDLE h; - - h = LoadLibraryW(L"comctl32.dll"); - fv_TaskDialog = GetProcAddress(h, "TaskDialog"); - } - wtitle = toUTF16(title); wdescription = toUTF16(description); dialogHelper = beginDialogHelper(); - hr = (*fv_TaskDialog)(dialogHelper, NULL, NULL, wtitle, wdescription, buttons, icon, NULL); + hr = TaskDialog(dialogHelper, NULL, NULL, wtitle, wdescription, buttons, icon, NULL); if (hr != S_OK) logHRESULT("error showing task dialog in msgbox()", hr); endDialogHelper(dialogHelper); diff --git a/redo/windows/uipriv_windows.h b/redo/windows/uipriv_windows.h index 541347eb..90abfb17 100644 --- a/redo/windows/uipriv_windows.h +++ b/redo/windows/uipriv_windows.h @@ -11,6 +11,7 @@ #if __MINGW64_VERSION_MAJOR < 4 #error MinGW-w64 version 4.0.0 or newer is required. #endif +// TODO exact version once my changes get pushed // ui internal window messages enum {