A secondary window provides a sizeable and scrollable dialog interface. Secondary window functions are compatible with PM dialog window functions, so it is an easy task to make changes to existing code that uses the PM dialog window functions.
The secondary window uses two frame windows, a standard frame and a dialog frame. The standard frame window offers the standard services-moving, sizing, minimizing, maximizing, and closing-as well as a service for resizing the window to a default size.
The window handle returned by WinLoadSecondaryWindow is the handle to the standard frame. This handle is used when associating a help instance, modifying the title bar or system menu, and doing WinSetWindowPos operations.
The window handle that is used to pass messages to the secondary window procedure pointed to by WinLoadSecondaryWindow is the dialog window handle. This handle is used to access controls on the dialog with the WinWindowFromID function. An application can get a handle to the dialog window by passing the outer frame window handle to WinQuerySecondaryHWND. The dialog window is a child of the standard window's FID_CLIENT window.
When the secondary window is opened, the frame window is set to the default size, which accommodates the dimensions of the dialog window. If the user makes the client window smaller by sizing the frame window, the dialog window is clipped and vertical and horizontal scroll bars appear. Selecting Default Size restores the frame window to the optimal size for displaying the dialog. Because the Sizeable Dialog Frame Manager manages the display of the standard window and its scroll bars automatically, the application needs to manage only the dialog window.
The OS/2 multimedia Volume Control application, shown in the beginning of the OS/2 Multimedia Controls section, provides an example of a modeless secondary window implementation.