WinCreateSecondaryWindow
Appearance
This function creates a secondary window from a dialog template in memory.
Syntax
#define INCL_SW #include <os2.h> HWND hwndParent; /* Parent window handle. */ HWND hwndOwner; /* Window-handle owner. */ PFNWP pfnDlgProc; /* Secondary window procedure. */ PDLGTEMPLATE pdlgt; /* Dialog template. */ PVOID pCreateParams; /* Parameters passed to secondary window proc. */ HWND hwnd; /* Window handle. */ hwnd = WinCreateSecondaryWindow(hwndParent, hwndOwner, pfnDlgProc, pdlgt, pCreateParams);
Parameters
- hwndParent (HWND) - input
- The parent window handle of the secondary window to be created.
- hwndOwner (HWND) - input
- The owner-window handle of the secondary window to be created.
- pfnDlgProc (PFNWP) - input
- The secondary window procedure.
- pdlgt (PDLGTEMPLATE) - input
- The dialog template that defines the layout of the window.
- pCreateParams (PVOID) - input
- The parameters passed to the secondary window procedure on the WM_INITDLG message.
Return Value
- hwnd (HWND) - returns
- Returns the frame window handle of a secondary window.
Remarks
Refer to WinCreateDlg in the IBM OS/2 Presentation Manager Programming Reference.
Example Code
The following code illustrates how create a secondary window from a dialog template in memory.
#define INCL_SW
#include <os2me.h>
PDLGTEMPLATE pdlgt;
hmod (modulehandle)
DosGetResource (NULL, RT_DIALOG, ID_DIALOG, (PVOID) pdlgt);
WinCreateSecondaryWindow ( HWND_DESKTOP, /* Parent window */
HwndOwner, /* Owner window */
MyDlgProc, /* Dialog procedure */
pdlgt, /* Dialog template */
NULL); /* Create parameters */