Jump to content

WinSecondaryWindow

From EDM2

This function loads and processes a modal secondary window and returns the result value established by WinDismissSecondaryWindow.

Syntax

#define INCL_SW
#include <os2.h>

HWND      hwndParent;     /*  Parent window handle. */
HWND      hwndOwner;      /*  Owner window handle. */
PFNWP     pfnDlgProc;     /*  Secondary window procedure. */
HMODULE   hmod;           /*  Module handle. */
ULONG     idDlg;          /*  Resource ID of dialog template. */
PVOID     pCreateParams;  /*  Parameters passed to secondary window proc. */
ULONG     rc;             /*  Results. */

rc = WinSecondaryWindow(hwndParent, hwndOwner, pfnDlgProc, hmod, idDlg, pCreateParams);

Parameters

hwndParent (HWND) - input
The parent window handle of the WinCreateSecondaryWindow frame.
hwndOwner (HWND) - input
The owner-window handle of the WinCreateSecondaryWindow frame.
pfnDlgProc (PFNWP) - input
The secondary window procedure for CreateDialogWindow. This is a dialog procedure, except that it calls WinDefSecondaryWindowProc.
hmod (HMODULE) - input
Module handle for resource module.
idDlg (ULONG) - input
Resource ID of dialog template in the resources of module hmod.
pCreateParams (PVOID) - input
This is passed to the secondary window procedure in the WM_INITDLG message.

Return Value

rc (ULONG) - returns
Return the result passed to WinDismissSecondaryWindow.

Remarks

This call creates a standard frame window with a dialog window as the child of FID_CLIENT. Refer to WinDlgBox in the IBM OS/2 Presentation Manager Programming Reference.

Example Code

The following code illustrates how to load and process a modal secondary window and returns the result value established by WinDismissSecondaryWindow.

   #define INCL_SW
   #include <os2me.h>

   ULONG Result;

   Result  =  WinSecondaryWindow (HWND_DESKTOP,
                                  HWND_DESKTOP,
                                  MyDlgProc,
                                  NULL,
                                  ID_DIALOG,
                                  NULL);

Related Functions