The window procedure for the status bar control automatically sets the initial size and position of the window. The width is the same as that of the parent window's client area. The height is based on the width of the window's borders and on the metrics of the font that is currently selected into the status bar's device context on.
The window procedure automatically adjusts the size of the status bar whenever it receives a WM_SIZE message. Typically, when the size of the parent window changes, the parent sends a WM_SIZE message to the status bar.
An application can set the minimum height of a status bar's drawing area by sending the window an SB_SETMINHEIGHT message that specifies the minimum height in pixels. The drawing area does not include the window's borders.
You retrieve the widths of the borders of a status bar by sending the window an SB_GETBORDERS message. The message includes the address of a three-element array that receives the widths.