Frame controls can respond to this message to reposition themselves or resize themselves in the window frame.
Menu controls respond to this message as follows:
MS_ACTIONBAR not specified
The SWP cx and SWP cy fields are set so that the menu window exactly contains all of the items in the menu. The SWP x and SWP y fields are not changed.
MS_ACTIONBAR specified and MS_TITLEBUTTON not specified
The items in the menu are arranged such that all of the items are visible within the width specified by the SWP cx field. This formatting may cause the menu items to be arranged in multiple lines. The SWP cx field is set to include all of the lines of the menu. The SWP x and SWP y fields are not changed.
MS_ACTIONBAR specified and MS_TITLEBUTTON specified
The SWP cx value is set to the accumulated width of the items in the menu. The height specified in the SWP cy field is not changed. In both instances, the SWP cx and SWP cy fields are only altered if SWP_SIZE is specified in the fl field. Instead, the width of MS_TITLEBUTTON menus is determined by the accumulated width of the items in the menu.
A list box does two things:
The entry field control, if ES_MARGIN is specified, outsets its margin. This means that in the resource file, the numbers specified as the x-, and y-position of an entry field control are taken to be the position where the first character of text is drawn, not where the lower-left corner of the surrounding box is drawn. Similarly, the height and width parameters apply to the editable area of the control; consequently, they do not include the margin.
When a dialog is created with WinCreateDlg or WinLoadDlg, a WM_ADJUSTWINDOWPOS message is sent to each child window after the dialog window is created, with a pointer to a SWP structure containing fl equal to SWP_SIZE | SWP_MOVE and the x, y, cy, and cx fields initialized to the current size and position of the window. The message enables the control to adjust its size or position, usually to compensate for its border, or margin, or both.