[API]
CreateDialogIndirectParamA
CreateDialogIndirectParamW

[INCLUDE]
LoadResEx_Data

[CODE]
Public Function CreateDialogIndirectParam(ByVal ResDialogOrID As Variant, ByVal hWndParent As Long, ByVal lpDialogFunc As Long, ByVal dwInitParam As Long, Optional ByVal hModule As Long) As Long
  Dim xChar1 As String

  If VarType(ResDialogOrID) = vbString Then
    xChar1 = ResDialogOrID
    Else
    xChar1 = LoadResEx_Data("#" + CStr(ResDialogOrID), "#5", True)
    End If
  If Not Len(xChar1) = 0& Then
    If hModule = 0& Then hModule = App.hInstance
    If IsUnicode Then
      CreateDialogIndirectParam = CreateDialogIndirectParamW(hModule, xChar1, hWndParent, lpDialogFunc, dwInitParam)
      Else
      CreateDialogIndirectParam = CreateDialogIndirectParamA(hModule, xChar1, hWndParent, lpDialogFunc, dwInitParam)
      End If
    End If
  End Function
