Showing progress bar in a status bar pane (3)

Assuming that most of the time when you are about to start a long operation, you want to show a short text in the leftmost plain-vanilla text pane, and immediately next to it a progress bar, a nice solution would be not to disturb the content of the status bar, create a progress control, initialize and advance it until operation is complete, then return the status bar to its initial state (idle text). This way, you do not have to add/remove panes in the status bar neither to resize or otherwise alter the panes, because usually all panes on a status bar are grouped rightmost, and the remaining space is used for regular text messages.

This can be best achieved by deriving a class from CStatusBar and adding a CProgressCtrl child in it. We can then add members to the new CStatusBarWithProgress to hide/show and control the progress bar.

All these prepared, you can now open up your frame class' header, and simply change CStatusBar with our new CStatusBarWithProgress. That's all.

Header file

Implementation file



Comments

  • Source & Sample File Up Load..

    Posted by Legacy on 06/24/1999 12:00am

    Originally posted by: Yong Jin Nam

    hi.Farkas.
    please running source file and sample file upload...
    good luck

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: November 20, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT Are you wanting to target two or more platforms such as iOS, Android, and/or Windows? You are not alone. 90% of enterprises today are targeting two or more platforms. Attend this eSeminar to discover how mobile app developers can rely on one IDE to create applications across platforms and approaches (web, native, and/or hybrid), saving time, money, and effort and introducing apps to market faster. You'll learn the trade-offs for gaining long …

  • IBM Worklight is a mobile application development platform that lets you extend your business to mobile devices. It is designed to provide an open, comprehensive platform to build, run and manage HTML5, hybrid and native mobile apps.

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds