Compatibility with PM Dialog Window Functions

The design of secondary window functions is very much like the design of dialog window functions. The following table, which lists the secondary window functions, includes the names of PM dialog window equivalent functions.

┌────────────────────────────┬─────────────────┬──────────────────────────────┐
│Secondary Window Function   │PM Dialog Window │Description                   │
│                            │Equivalent       │                              │
├────────────────────────────┼─────────────────┼──────────────────────────────┤
│WinLoadSecondaryWindow      │WinLoadDlg       │Creates a modeless secondary  │
│                            │                 │window from a dialog template │
│                            │                 │in a resource.                │
├────────────────────────────┼─────────────────┼──────────────────────────────┤
│WinSecondaryWindow          │WinDlgBox        │Creates a modal secondary     │
│                            │                 │window from a dialog template │
│                            │                 │in a resource DLL and returns │
│                            │                 │the result value established  │
│                            │                 │by the                        │
│                            │                 │WinDismissSecondaryWindow     │
│                            │                 │call.                         │
│                            │                 │WinSecondaryWindow combines   │
│                            │                 │the functions of              │
│                            │                 │WinLoadSecondaryWindow,       │
│                            │                 │WinProcessSecondaryWindow, and│
│                            │                 │WinDestroySecondaryWindow.    │
├────────────────────────────┼─────────────────┼──────────────────────────────┤
│WinProcessSecondaryWindow   │WinProcessDlg    │Processes a modal secondary   │
│                            │                 │window by dispatching messages│
│                            │                 │while the modal window is     │
│                            │                 │displayed.                    │
├────────────────────────────┼─────────────────┼──────────────────────────────┤
│WinDismissSecondaryWindow   │WinDismissDlg    │Causes modal                  │
│                            │                 │WinProcessSecondaryWindow or  │
│                            │                 │WinSecondaryWindow calls to   │
│                            │                 │return.                       │
├────────────────────────────┼─────────────────┼──────────────────────────────┤
│WinDestroySecondaryWindow   │WinDestroyWindow │Destroys a secondary window.  │
├────────────────────────────┼─────────────────┼──────────────────────────────┤
│WinDefSecondaryWindowProc   │WinDefDlgProc    │Provides the default behavior │
│                            │                 │for a secondary window. A     │
│                            │                 │secondary window procedure    │
│                            │                 │must reference this function  │
│                            │                 │for messages that are not     │
│                            │                 │handled explicitly.           │
├────────────────────────────┼─────────────────┼──────────────────────────────┤
│WinCreateSecondaryWindow    │WinCreateDlg     │Creates a Secondary Window    │
│                            │                 │from a dialog template in the │
│                            │                 │application's executable file.│
├────────────────────────────┼─────────────────┼──────────────────────────────┤
│WinSecondaryMessageBox      │WinMessageBox    │Creates a modal window that   │
│                            │                 │can be used to display error  │
│                            │                 │messages and ask questions.   │
├────────────────────────────┼─────────────────┼──────────────────────────────┤
│WinQuerySecondaryHWND       │WinQueryWindow   │Returns either the handle to  │
│                            │                 │the outer frame or inner      │
│                            │                 │dialog window of a secondary  │
│                            │                 │window, depending on the      │
│                            │                 │handle supplied as input.     │
├────────────────────────────┼─────────────────┼──────────────────────────────┤
│WinDefaultSize              │None             │Sizes the dialog window to its│
│                            │                 │recommended, optimal size.    │
├────────────────────────────┼─────────────────┼──────────────────────────────┤
│WinInsertDefaultSize        │None             │Adds the Default Size item to │
│                            │                 │the system menu of a secondary│
│                            │                 │window.                       │
└────────────────────────────┴─────────────────┴──────────────────────────────┘


[Back: Secondary Windows]
[Next: Creating a Secondary Window]