Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
16 Views

TaskDialog missing in comctl32.f90

I'm trying to use the Windows API TaskDialog ​function. As mentioned here, this function is included in the Comctl32​ library. However, this function definition is missing from the comctl32​.f90 file. Can I create a definition in a new module or is it more complex for calling an API function?

0 Kudos
1 Reply
Highlighted
New Contributor I
16 Views

You should be able to create your own interface for the function by considering its structure and consulting interfaces to other API functions featuring similar arguments in comctrl32.F90.

The API function interface is

HRESULT TaskDialog(
  _In_  HWND                           hWndParent,
  _In_  HINSTANCE                      hInstance,
  _In_  PCWSTR                         pszWindowTitle,
  _In_  PCWSTR                         pszMainInstruction,
  _In_  PCWSTR                         pszContent,
  _In_  TASKDIALOG_COMMON_BUTTON_FLAGS dwCommonButtons,
  _In_  PCWSTR                         pszIcon,
  _Out_ int                            *pnButton
);

 

Most of the arguments are pointers which should be represented as  POINTER_LEN Integers in Fortran (defined in IFWINTY) except the TASKDIALOG_COMMON_BUTTON_FLAGS, which looks like a simple Integer.

0 Kudos