Microsoft KB Archive/102485

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 20:22, 16 July 2020 by X010 (talk | contribs) (stage2)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

INFO: The SBS_SIZEBOX Style

Q102485



The information in this article applies to:


  • Microsoft Win32 Software Development Kit (SDK)





SUMMARY

A size box is a small rectangle the user can expand to change the size of the window. When you want a size box, you create a SCROLLBAR window with the SBS_SIZEBOX flag. This action creates a size box with the height, width, and position that you specified in the call to CreateWindow. If you specify SBS_SIZEBOXBOTTOMRIGHTALIGN, the box will be aligned in the lower right of the rectangle you specified when creating the window. If you specify SBS_SIZEBOXTOPLEFTALIGN, the box will be aligned in the upper left of the rectangle you specified in your call to CreateWindow().



MORE INFORMATION

The user moves the mouse pointer over to the box, presses and holds the left mouse button, and drags the mouse pointer to resize the window. When the user does this, the borders on the window (the frame) move. When the user releases the mouse button, the window is resized.

You create a size box by creating a child window of type WS_CHILD | WS_VISIBLE | SBS_SIZEBOX | SBS_SIZEBOXTOPLEFTALIGN. You don't have to do any of the processing for this; the system will take care of it. You will notice in your window procedure that you will get the scroll bar messages plus the WM_MINMAXINFO message. Size boxes work similar to the way the WS_THICKFRAME/WS_SIZEBOX style does on a window.

Under Windows NT, applications that create a size box either using WS_SIZEBOX or WS_THICKFRAME or by created the SBS_SIZEBOX control have no way of showing the user that such a feature exists. Under Windows 95, the size box appears as a jagged edge, usually at the bottom right corner.

NOTE: Make sure that the main window is created with the WS_VSCROLL and WS_HSCROLL styles.

Additional query words: sizebox

Keywords : kbCtrl kbOSWinNT kbOSWin2000 kbScrollBar kbSDKWin32 kbGrpDSUser kbOSWin95 kbOSWin98
Issue type : kbinfo
Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch


Last Reviewed: July 12, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.