WM SIZE
This message occurs when a window changes its size.
Syntax
param1 SHORT scxold; /* Old horizontal size. */ SHORT scyold; /* Old vertical size. */ param2 SHORT scxnew; /* New horizontal size. */ SHORT scynew; /* New vertical size. */
Parameters
- scxold (SHORT) - input
- Old horizontal size.
- scyold (SHORT) - input
- Old vertical size.
- scxnew (SHORT) - input
- New horizontal size.
- scynew (SHORT) - input
- New vertical size.
Returns
- ulReserved (ULONG) - returns
- Reserved value, should be 0.
Remarks
This message is not sent by WinCreateWindow when a window is created, and so any size-related processing must be done during the WM_CREATE message processing in this instance.
This message is sent after the window has been actually sized, but before any repainting has been done. Any resizing or repositioning of child windows that might be necessary as a result of the size change is usually done during the processing of this message.
- Note: It is generally unwise to output to the window during the processing of this message, because the area drawn might be redrawn, after the WM_SIZE processing is complete, by the WinSetWindowPos function.
The processing of this message for a window which is displaying an advanced VIO presentation space must be carried out by the default advanced VIO window procedure.
Language Support Dialog
The Language Support Dialog Procedure responds to this message by issuing the WinDefDlgProc function, then posting a WM_PSIZE message to the application queue and setting ulReserved to the result of the WinDefDlgProc function.
Language Support Window
The Language Support Window Procedure responds to this message by posting a WM_PSIZE message to the application queue and setting ulReserved to 0.
in Notebook Controls
When the size of the notebook window changes, all of the regions are recalculated. The notebook sends a BKN_NEWPAGESIZE notification code to the application. The notebook sets the position and size of application page windows that are associated with pages for whom the BKA_AUTOPAGESIZE attribute is set.
in Value Set Controls
When the value set window is sized, the value set control defaults the size of each item by dynamically dividing the window size by the number of rows and columns. It allows enough room for the border, selection cursor, and selection emphasis, and defaults the spacing between items to 0. To override these default settings, the application must resend the VM_SETMETRICS message.
Default Processing
The default window procedure takes no action on this message, other than to set ulReserved to 0.
in Frame Controls
The frame control window procedure responds to this message by sending a WM_FORMATFRAME (in Frame Controls) message to itself and by setting ulReserved to 0.
Related Messages
- WM_SIZE (in Frame Controls)
- WM_SIZE (Language Support Dialog)
- WM_SIZE (Language Support Window)