[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 LoadResEx_SetLanguageFile Then
    xChar1 = LoadResEx_Data(ResDialogOrID, 5, LoadResEx_LanguageFile_hModule)
    #Else
    xChar1 = LoadResEx_Data(ResDialogOrID, 5, App.hInstance)
    #End If
  If Not Len(xChar1) = 0& Then
    If hModule = 0& Then
      #If InIDE And Not CustomClassesInDialogs And LoadResEx_SetThemeFile Then
        hModule = LoadResEx_ThemeFile_hModule
        If hModule = 0& Then hModule = App.hInstance
        #ElseIf InIDE And Not CustomClassesInDialogs And LoadResEx_SetLanguageFile Then
        hModule = LoadResEx_LanguageFile_hModule
        If hModule = 0& Then hModule = App.hInstance
        #Else
        hModule = App.hInstance
        #End If
      End If
    If IsUnicode Then
      CreateDialogIndirectParam = CreateDialogIndirectParamW(hModule, xChar1, hWndParent, lpDialogFunc, dwInitParam)
      Else
      CreateDialogIndirectParam = CreateDialogIndirectParamA(hModule, xChar1, hWndParent, lpDialogFunc, dwInitParam)
      End If
    End If
  End Function
