Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Progress Control in Statusbar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Progress Control in Statusbar

 Post Reply Post Reply
Author
Message
unknow View Drop Down
Groupie
Groupie
Avatar

Joined: 14 January 2009
Location: Belgium
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote unknow Quote  Post ReplyReply Direct Link To This Post Topic: Progress Control in Statusbar
    Posted: 22 September 2009 at 6:37pm
Hi; I'd like to show a progress control within my application status bar (ie. to display operations progression).
 
I reused the code provided with the Statusbar sample, which is mainl :
 
CMainFrame::OnCreate(.....
 m_wndStatusBar.GetPane(0)->SetBeginGroup(FALSE);
 m_wndStatusBar.SetRibbonDividerIndex(m_wndStatusBar.GetPaneCount() - 1);
 AddProgress();
 m_wndStatusBar.EnableCustomization();
I also of course declared the value ID_INDICATOR_PROG is ressource strings, and declared CProgressCtrl m_wndProgCtrl in mainfrm.h.
 
But the Progresscontrol doesn't show !!??
 
I've done exactly as in the example, when debugging the ::AddProgress function, the trace result is identically between the sample and my App.
 
I even added full statusbar indicators to the statusbar sample, removed all other controls like AddLogo(), AddEdit() etc.. and the ProgressControl still displays..
 
What could I possibly forget to do in my App, any hint?
 
Many thankx in advance!!
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 23 September 2009 at 3:42am
Hi,
try to trace CXTPStatusBar::PositionControls() method.
 
anyway think CXTPStatusBarProgressPane is better choise for progress in StatusBar.
 
From RibbonSample:
 
CXTPStatusBarProgressPane* pProgressPane = (CXTPStatusBarProgressPane*)m_wndStatusBar.AddIndicator(new CXTPStatusBarProgressPane(), ID_INDICATOR_PROGRESS);
 pProgressPane->SetBeginGroup(FALSE);
 pProgressPane->SetCaption(_T("&ProgressBar"));
 pProgressPane->SetWidth(100);
 pProgressPane->SetPos(30);
 pProgressPane->SetPadding(3, 0, 3, 0);
 pProgressPane->SetVisible(FALSE);

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
unknow View Drop Down
Groupie
Groupie
Avatar

Joined: 14 January 2009
Location: Belgium
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote unknow Quote  Post ReplyReply Direct Link To This Post Posted: 23 September 2009 at 4:03pm
ok; I found what was wrong (I wasn't using correctly the show/hide function) and the progress control remained in hide state, I noticed that by accessing the statusbar menu (right-click).
 
I just have another problem I can't seem to solve: the progress control is displayed in old windows 95 flat blue color format.
 
I don't understand since I copied entirely the progress control related code from statusbar, where the style is set to PBS_SMOOTH.
 
Also my application is using the Toolkit Office2007 paintmanager time and it is successfully on ALL the controls/windows of my applications (including statusbar) - EXCEPT to the progress control !??
 
Any idea?
Thanks ;)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.