A status bar is a horizontal window at the bottom of a parent home window in i m sorry an application can display various kinds of condition information. The status bar can be split into parts to display an ext than one kind of information. The following display shot mirrors the standing bar in the benidormclubdeportivo.org Windows repaint application. In this case, the condition bar consists of the message "For Help, click assist Topics top top the help Menu". The status bar is the area at the bottom the the home window that contains help text and coordinate information.
You are watching: Where is the status bar in word
This section consists of the complying with topics.
Types and also Styles
The default place of a status bar is along the bottom the the parent window, but you have the right to specify the CCS_TOP layout to have actually it show up at the optimal of the parent window"s customer area.
You have the right to specify the SBARS_SIZEGRIP layout to include a sizing grip in ~ the right finish of the condition bar.
Combining the CCS_TOP and SBARS_SIZEGRIP formats is no recommended because the result sizing grip is no functional.
Size and Height
The window procedure because that the standing bar instantly sets the early size and also position of the window, skipping the values mentioned in the CreateWindowEx function. The width is the exact same as the of the parent window"s customer area. The elevation is based on the metrics of the font the is at this time selected into the condition bar"s maker context and on the broad of the window"s borders.
The window procedure instantly adjusts the size of the status bar whenever it receives a WM_SIZE message. Typically, once the size of the parent window changes, the parent sends a WM_SIZE article to the standing bar.
An application can collection the minimum elevation of a status bar"s drawing area by sending the home window an SB_SETMINHEIGHT message, specifying the minimum height, in pixels. The drawing area does not include the window"s borders. A minimum height is useful for drawing in one owner-drawn standing bar. For more information, view Owner-Drawn condition Bars later in this chapter.
You retrieve the widths that the boundaries of a standing bar by sending the window an SB_GETBORDERS message. The message consists of the attend to of a three-element variety that receive the widths.
Multiple-Part standing Bars
A status bar deserve to have plenty of different parts, every displaying a different line of text. You division a condition bar into parts by sending out the window an SB_SETPARTS message, point out the variety of parts come create and also the resolve of an integer array. The array contains one aspect for each part, and also each facet specifies the customer coordinate of the right edge the a part.
A standing bar can have a maximum of 256 parts, return applications generally use far fewer than that. Friend retrieve a counting of the parts in a standing bar, and the coordinate of the appropriate edge of each part, by sending out the window an SB_GETPARTS message.
Status Bar text Operations
You set the message of any component of a status bar by sending the SB_SETTEXT message, clues the zero-based table of contents of a part, an address of the cable to attract in the part, and the method for illustration the string. The drawing method determines even if it is the text has a border and, if that does, the format of the border. It additionally determines even if it is the parent window is responsible for illustration the text. For more information, view the Owner-Drawn standing Bars ar below.
By default, message is left-aligned in ~ the specified part of a status bar. You can embed tab characters ( t) in the text to facility or right-align it. Text to the best of a single tab personality is centered, and also text come the appropriate of a second tab personality is right-aligned.
To retrieve message from a condition bar, usage the SB_GETTEXTLENGTH and SB_GETTEXT messages.
If her application supplies a status bar that has actually only one part, you deserve to use the WM_SETTEXT, WM_GETTEXT, and also WM_GETTEXTLENGTH message to carry out text operations. This messages deal only with the part that has actually an index of zero, allowing you to treat the condition bar lot like a static message control.
To display a heat of status without creating a condition bar, usage the DrawStatusText function. The role uses the same methods to draw the status as the window procedure because that the condition bar, yet it does no automatically collection the size and also position of the condition information. When calling the function, you must specify the size and position the the condition information and the an equipment context of the home window in which to attract it.
Owner-Drawn status Bars
You can specify individual components of a status bar to be owner-drawn parts. Using this method gives you much more control 보다 you would otherwise have over the figure of the window part. For example, girlfriend can display screen a bitmap quite than message or draw text utilizing a different font.
To specify a window part as owner-drawn, send the SB_SETTEXT article to the standing bar, specifying the component and the SBT_OWNERDRAW drawing technique. As soon as SBT_OWNERDRAW is specified, the lParam parameter is a 32-bit application-defined worth that the application have the right to use when illustration the part. For example, you have the right to specify a font handle, a bitmap handle, an resolve of a string, and so on.
When a standing bar needs to draw an owner-drawn part, it sends the WM_DRAWITEM article to the parental window. The wParam parameter the the blog post is the child window identifier of the standing bar, and the lParam parameter is the deal with of a DRAWITEMSTRUCT structure. The parent window uses the information in the framework to attract the part. Because that an owner-drawn component of a condition bar, DRAWITEMSTRUCT includes the following information.
|CtlType||Undefined; carry out not use.|
|CtlID||Child home window identifier the the standing bar.|
|itemID||Zero-based table of contents of the component to it is in drawn.|
|itemAction||Undefined; execute not use.|
|itemState||Undefined; perform not use.|
|hwndItem||Handle come the status bar.|
|hDC||Handle come the machine context the the condition bar.|
|rcItem||Coordinates that the window component to be drawn. The collaborates are loved one to the upper left edge of the status bar.|
|itemData||Application-defined 32-bit value stated in the lParam parameter of the SB_SETTEXT message.|
Simple mode Status Bars
You put a standing bar in "simple mode" by sending it an SB_SIMPLE message. A basic mode standing bar displays only one part. As soon as the message of the home window is set, the window is invalidated, but it is no redrawn till the following WM_PAINT. Wait for the post reduces display flicker through minimizing the number of times the window is redrawn. A an easy mode status bar is beneficial for displaying help text for menu items if the user is scrolling with the menu.
The string that a condition bar displays while in an easy mode is maintained independently from the strings that it displays while in nonsimple mode. This means you deserve to put the home window in basic mode, set its text, and also switch earlier to nonsimple setting without the nonsimple setting text being changed.
When setup the message of a basic mode condition bar, you have the right to specify any kind of drawing an approach except SBT_OWNERDRAW. A an easy mode status bar go not assistance owner drawing.
Default standing Bar post Processing
This section describes the messages handled by the home window procedure because that the predefined STATUSCLASSNAME class.
|WM_CREATE||Initializes the status bar.|
|WM_DESTROY||Frees resources allocated for the status bar.|
|WM_GETFONT||Returns the manage to the present font v which the standing bar paint, etc its text.|
|WM_GETTEXT||Copies the message from the very first part of a standing bar come a buffer. It return a 32-bit value that specifies the length, in characters, the the text and the method used to draw the text.|
|WM_GETTEXTLENGTH||Returns a 32-bit worth that specifies the length, in characters, of the text in the first part the a status bar and the technique used to attract the text.|
|WM_NCHITTEST||Returns the HTBOTTOMRIGHT worth if the mouse cursor is in the sizing grip, leading to the system to display screen the sizing cursor. If the computer mouse cursor is not in the sizing grip, the condition bar overcome this article to the DefWindowProc function.|
|WM_PAINT||Paints the invalid region of the standing bar. If the wParam parameter is non-NULL, the control assumes that the value is an HDC and paints making use of that device context.|
|WM_SETFONT||Selects the font handle into the maker context because that the condition bar.|
|WM_SETTEXT||Copies the stated text right into the an initial part that a standing bar, utilizing the default illustration operation (specified as zero). It returns TRUE if successful, or FALSE otherwise.|
See more: Today In Labor History: Air Conditioner Invented By Black Man
|WM_SIZE||Resizes the standing bar based upon the existing width that the parental window"s client area and also the elevation of the existing font the the status bar.|