[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) As Long
  Dim xChar1 As String
  Dim hModule As Long

  If VarType(ResDialogOrID) = vbString Then
    xChar1 = ResDialogOrID
    Else
    #If LoadResEx_SetLanguageFile Then
      xChar1 = LoadResEx_Data("#" + CStr(ResDialogOrID), "#5", LoadResEx_LanguageFile_hModule)
      #Else
      xChar1 = LoadResEx_Data("#" + CStr(ResDialogOrID), "#5", App.hInstance)
      #End If
    End If
  If Not Len(xChar1) = 0& Then
    #If InIDE And Not CustomClassesInDialogs And LoadResEx_SetThemeFile Then
      hModule = LoadResEx_ThemeFile_hModule
      #ElseIf InIDE And Not CustomClassesInDialogs And LoadResEx_SetLanguageFile Then
      hModule = LoadResEx_LanguageFile_hModule
      #End If
    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
