Print Page | Close Window

CXTPStatusBarPane

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=12869
Printed Date: 18 May 2024 at 12:44pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPStatusBarPane
Posted By: yyh7011cn
Subject: CXTPStatusBarPane
Date Posted: 07 December 2008 at 5:21pm

Help me,

         I want to change the statusBarPane's text  dynamicly, So I write the following code: 
CXTPStatusBarPane* pPane = m_wndStatusBar.FindPane(ID_YYHINFO);

 CString buf;
 for( int i = 0; i < 100000;i++ )
 {
  buf.Format(_T("this is %d"),i);
  SendMessage(WM_SET2TEXT,(WPARAM)(LPCTSTR)buf,0);
  pPane->SetText(buf);
  
 }

but the statusbar only display the last text,why? a MFC program with not using toolkitpro can work, tell me how to do?



Replies:
Posted By: Oleg
Date Posted: 08 December 2008 at 5:57am
Hi,
You just need
 
CXTPStatusBarPane* pPane = m_wndStatusBar.FindPane(ID_YYHINFO);
pPane->SetText("New Text");
 
check that pPane is pane you need.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: yyh7011cn
Date Posted: 08 December 2008 at 6:13am
thanks,I want to do the following things:
CXTPStatusBarPane* pPane = m_wndStatusBar.FindPane(ID_YYHINFO);
pPane->SetSext("Started");
for( int i = 0; i < 1000000;i++)
{
        //do something
}
pPane->SetText("Finished");
 but the statusbar doesnot display "Started", It can display "Finished" until the loop is end.


Posted By: Oleg
Date Posted: 08 December 2008 at 4:15pm
Hi,
Add m_wndStatusBar.UpdateWindow(); after change text.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: yyh7011cn
Date Posted: 08 December 2008 at 5:41pm
Thanks,It can work.



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