- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
StartDlg = DlgInit(IDD_DIALOG5, XDlg)
How to settle this problem?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's because you have to use DLGINITFRONRESOURCEHANDLE when the dialog is in a DLL. If your dll is called 'mydll.dll', use
INTEGER Hinst, iret
type (dialog) dlg
Hinst=GetModuleHandle('mydll.dll'C)
iret=DlgInitwithResoureHandle(IDD_DIALOG,Hinst, dlg)
From the Help:
"DLGINIT, DLGINITWITHRESOURCEHANDLE
Run-Time Functions: Initialize a dialog box.
Module: USE DFLOGM
Syntax
result = DLGINIT (id, dlg)result = DLGINITWITHRESOURCEHANDLE (id, hinst, dlg)
id
(Input) INTEGER(4). Dialog identifier. Can be either the symbolic name for the dialog or the identifier number, both listed in the Include file (with extension .FD).
dlg
(Output) Derived type DIALOG. Contains dialog box parameters.
hinst
(Input) INTEGER(4). Module instance handle in which the dialog resource can be found.
Results:
The result is of type LOGICAL(4). The result is .TRUE. if successful; otherwise, the result is .FALSE..
DLGINIT must be called to initialize a dialog box before it can be used with DLGMODAL, DLGMODELESS, or any other dialog function.
DLGINIT will only search for the dialog box resource in the main application. For example, it will not find a dialog box resource that has been built into a dynamic link library.
DLGINITWITHRESOURCEHANDLE can be used when the dialog resource is not in the main application. If the dialog resource is in a dynamic link library (DLL), hinst must be the value passed as the first argument to the DLLMAIN procedure"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page