Microsoft KB Archive/98473

= INFO: Updating the Application Status Bar on Demand =

Article ID: 98473

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++ 1.0 Professional Edition</li></ul>

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

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

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

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

-

<div class="notice_section">

This article was previously published under Q98473

<div class="summary_section">

SUMMARY
In an application developed with the Microsoft Foundation Classes (MFC), by default a status bar updates its panes only during idle processing.

An application can force a status bar to update its panes immediately by implementing an alternative to the idle processing mechanism. The application sends an update message to the status bar and then instructs the status bar to redraw its window. To update the status bar, send the WM_IDLEUPDATECMDUI message, discussed in MFC Tech Note #24, to the status bar then call the UpdateWindow function. The sample code below demonstrates the member function to add to the CMainFrame window class.

<div class="moreinformation_section">

Sample Code
/*   * Compile options needed: None */

void CMainFrame::MyUpdatePane {     m_wndStatusBar.SendMessage(WM_IDLEUPDATECMDUI); m_wndStatusBar.UpdateWindow; }

Keywords: kbinfo kbstatbar kbuidesign kbmfcctrlbar KB98473

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.