Print Page | Close Window

Progress Control in Statusbar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=15228
Printed Date: 21 December 2024 at 9:07pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Progress Control in Statusbar
Posted By: unknow
Subject: Progress Control in Statusbar
Date 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!!



Replies:
Posted By: Oleg
Date 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


Posted By: unknow
Date 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 ;)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net