Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 2.95 KB

status-bar-implementation-in-mfc.md

File metadata and controls

38 lines (24 loc) · 2.95 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Status Bar Implementation in MFC
Status Bar Implementation in MFC
11/19/2018
COldStatusBar
status bars [MFC], implementing in MFC
CStatusBarCtrl class [MFC], and MFC status bars
CStatusBar class [MFC], and CStatusBarCtrl class [MFC]
CStatusBarCtrl class [MFC], and CStatusBar class [MFC]
status bars [MFC], backward compatibility
status bars [MFC], old with COldStatusBar class [MFC]
COldStatusBar class [MFC]
status bars [MFC], and CStatusBarCtrl class
CStatusBar class [MFC], and MFC status bars
status indicators
status bars [MFC], Windows 95 implementation
be5cd876-38e3-4d5c-b8cb-16d57a16a142

Status Bar Implementation in MFC

A CStatusBar object is a control bar with a row of text output panes. The output panes are commonly used as message lines and as status indicators. Examples include the menu help-message lines that briefly explain the selected menu command and the indicators that show the status of the SCROLL LOCK, NUM LOCK, and other keys.

As of MFC version 4.0, status bars are implemented using class CStatusBarCtrl, which encapsulates a status bar common control. For backward compatibility, MFC retains the older status bar implementation in class COldStatusBar. The documentation for earlier versions of MFC describes COldStatusBar under CStatusBar.

CStatusBar::GetStatusBarCtrl, a member function new to MFC 4.0, allows you to take advantage of the Windows common control's support for status bar customization and additional functionality. CStatusBar member functions give you most of the functionality of the Windows common controls; however, when you call GetStatusBarCtrl, you can give your status bars even more of the characteristics of a status bar. When you call GetStatusBarCtrl, it will return a reference to a CStatusBarCtrl object. You can use that reference to manipulate the status bar control.

The following figure shows a status bar that displays several indicators.

Status bar.
A Status Bar

Like the toolbar, the status-bar object is embedded in its parent frame window and is constructed automatically when the frame window is constructed. The status bar, like all control bars, is destroyed automatically as well when the parent frame is destroyed.

What do you want to know more about

See also

Status Bars