WinDefaultSize
Appearance
This function sizes the window to its default size—the optimal size of the dialog window.
Syntax
#define INCL_SW #include <os2.h> HWND hwnd; /* Secondary window handle. */ BOOL rc; /* Return codes. */ rc = WinDefaultSize(hwnd);
Parameters
- hwnd (HWND) - input
- Secondary window handle.
Return Value
- rc (BOOL) - returns
- Return codes indicating success or failure:
- TRUE: Success.
- FALSE: Failure or not recognized.
Remarks
Sizes the window to its recommended optimal size.
Example Code
The following code illustrates how to size the window to its default size, or the optimum size of the dialog window.
#define INCL_SW
#include <os2me.h>
HWND hwndFrame;
hwndFrame = WinLoadSecondaryWindow (HWND_DESKTOP, /* Parent window */
HWND_DESKTOP, /* Owner window */
MyDlgProc, /* Dialog procedure*/
NULL, /* Module handle */
ID_DIALOG, /* Resource ID */
NULL); /* Create parameter*/
WinInsertDefaultSize (hwndFrame, "~Default size"); /* Insert Menu Item*/
WinDefaultSize (hwndFrame); /* Set window to its default size*/