Microsoft KB Archive/132110

= HOWTO: How to Create a Recessed Status Bar Area =

Article ID: 132110

Article Last Modified on 11/21/2006

-

APPLIES TO

 Microsoft Foundation Class Library 4.2, when used with:  Microsoft Visual C++ 1.0 Professional Edition

 Microsoft Visual C++ 1.5 Professional Edition

 Microsoft Visual C++ 1.51

 Microsoft Visual C++ 1.52 Professional Edition</li></ul>

 Microsoft Visual C++ 2.0 Professional Edition</li></ul>

 Microsoft Visual C++ 2.1</li></ul>

 Microsoft Visual C++ 4.0 Standard Edition</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q132110

<div class="summary_section">

SUMMARY
To implement a sunken or recessed border around the first pane of the status bar, you need to have SBPS_STRETCH style set for this pane.

<div class="moreinformation_section">

MORE INFORMATION
This style can be set immediately after you create the status bar in the CMainFrame::OnCreate handler of your Appwizard-generated application. Add the following call to SetPaneInfo in the CMainFrame::OnCreate handler: int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) {  // Code generated by the framework

m_wndStatusBar.SetPaneInfo( 0, m_wndStatusBar.GetItemID( 0 ),          SBPS_STRETCH, NULL ); } Here m_wndStatusBar is the CStatusBar member variable of the CMainFrame class, and CStatusBar::GetItemID returns the ID of the first pane.

NOTE: Only one pane of the status bar can have this style set.

<div class="references_section">