This example uses WinLoadDlg to load a dialog template from the application's .EXE file.

#define INCL_WINDIALOGS     /* Window Dialog Mgr Functions  */
#include <os2.h>

HWND  hwndOwner;               /* owner window                 */
HWND  hwndDlg;                 /* Dialog-window handle         */
PFNWP GenericDlgProc;          /* dialog process               */

hwndDlg = WinLoadDlg(HWND_DESKTOP,        /* parent is desk top */
                  hwndOwner,             /* owner is main frame */
                  GenericDlgProc,           /* dialog procedure */
                  0L,                /* load from resource file */
                  DLG_ID,                 /* dialog resource id */
                  NULL);                /* no dialog parameters */


[Back] [Next]