Share via


Setting the Mode of a CStatusBarCtrl Object

There are two modes for a CStatusBarCtrl object: simple and nonsimple. In the majority of cases, your status bar control will have one or more parts, along with text and perhaps an icon or icons. This is called the nonsimple mode. For more information on this mode, see Initializing the Parts of a CStatusBarCtrl Object.

However, there are cases where you only need to display a single line of text. In this case, the simple mode is sufficient for your needs. To change the mode of the CStatusBarCtrl object to simple, make a call to the SetSimple member function. Once the status bar control is in simple mode, set the text by calling the SetText member function, passing 255 as the value for the nPane parameter.

You can use the IsSimple function to determine what mode the CStatusBarCtrl object is in.

Note

If the status bar object is being changed from nonsimple to simple, or vice versa, the window is immediately redrawn and, if applicable, any defined parts are automatically restored.

See Also

Reference

Using CStatusBarCtrl

Concepts

Controls (MFC)