Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
WinGetDlgMsg (1.2)
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINDIALOGS
BOOL WinGetDlgMsg(hwnd, pqmsg);
HWND hwnd; /* dialog-window handle */
PQMSG pqmsg; /* pointer to structure with message */
The WinGetDlgMsg function retrieves a message intended for a dialog box.
This function is used by an application written in a language (for example,
COBOL, or FORTRAN) that does not allow the system to call the application's
window procedure (this is called a non-reentrant window procedure).
Parameter Description
────────────────────────────────────────────────────────────────────────────
hwnd Identifies the dialog window.
pqmsg Points to the QMSG structure that contains a message.
Return Value
The return value is TRUE if there is a message for the dialog box, or it is
FALSE if the dialog is complete or an error occurs.
Comments
The WinGetDlgMsg function allows a language that cannot support window
procedures to provide the function of a modal dialog window. The application
creates a modeless box dialog by using the WinCreateDlg or WinLoadDlg
functions and then calls WinGetDlgMsg to process messages associated with
the dialog box. The application should call this function in a loop until it
receives a WM_QUIT message. The application should call WinDefDlgProc for
the messages it does not want rather than dispatching the messages it
receives.
To create a window that uses a non-reentrant window procedure, use NULL for
the pfnWndProc parameter of the WinRegisterClass function.
The first time this function is called, the owner of the window specified by
hwnd is disabled, thereby preventing input into windows other than the
dialog box. The owner of the window specified by hwnd is enabled when the
WinDismissDlg function is issued by the application or by the default dialog
procedure.
Synchronous messages that would normally go directly to the window procedure
will be converted to one of the following messages and retrieved by the
WinGetDlgMsg function:
WM_PPAINT
WM_PSETFOCUS
WM_PSYSCOLORCHANGE
WM_PSIZE
WM_PACTIVATE
WM_PCONTROL
See Also
WinCreateDlg, WinDefDlgProc, WinDismissDlg, WinLoadDlg, WinRegisterClass,
QMSG
♦