DialogBoxIndirectParam function user32

Win32Result<int> DialogBoxIndirectParam(
  1. HINSTANCE? hInstance,
  2. Pointer<DLGTEMPLATE> hDialogTemplate,
  3. HWND? hWndParent,
  4. Pointer<NativeFunction<DLGPROC>>? lpDialogFunc,
  5. LPARAM dwInitParam,
)

Creates a modal dialog box from a dialog box template in memory.

To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-dialogboxindirectparamw.

Implementation

Win32Result<int> DialogBoxIndirectParam(
  HINSTANCE? hInstance,
  Pointer<DLGTEMPLATE> hDialogTemplate,
  HWND? hWndParent,
  Pointer<NativeFunction<DLGPROC>>? lpDialogFunc,
  LPARAM dwInitParam,
) {
  final result_ = DialogBoxIndirectParamW_Wrapper(
    hInstance ?? nullptr,
    hDialogTemplate,
    hWndParent ?? nullptr,
    lpDialogFunc ?? nullptr,
    dwInitParam,
  );
  return .new(value: result_.value.i64, error: result_.error);
}