![]() |
ProgressControl on CommandBar |
Post Reply
|
| Author | |
securigy
Groupie
Joined: 23 November 2007 Status: Offline Points: 41 |
Post Options
Thanks(0)
Quote Reply
Topic: ProgressControl on CommandBarPosted: 22 July 2009 at 10:06pm |
|
I can easily add progress control to command ba like shown in the example:
m_pToolbarProgressCtrl = new CXTPControlProgress();m_pProjectWizBar->GetControls()->Add((CXTPControl*)m_pToolbarProgressCtrl);
BOOL bVista = ((CBluetoothControllerApp*)AfxGetApp())->IsVista(); m_pToolbarProgressCtrl->Init(bVista, TRUE, bVista ? 10 : 30, 100, 1); However I can't make it Marquee style since the CXTPControlProgress class is derived from CXTPControl and others that are not derived from CWnd and therefore cannot be used to send windows message that sets the marquee style: HWND hWnd = GetSafeHwnd(); LONG_PTR dwLong = GetWindowLongPtr(hWnd, GWL_STYLE); LONG_PTR dwNewLong = dwLong | PBS_MARQUEE; dwLong = SetWindowLongPtr(hWnd, GWL_STYLE, (LONG)dwNewLong); LRESULT lResult = this->SendMessage((UINT)PBM_SETMARQUEE,// message ID// set to marqee (LPARAM) m_nMarqueeDelay); // time in milisec between update I tried to derive my own progress ctrl from CProgressControl but then the following line crashes (not sure why I was expecting a miracle)m_pProjectWizBar->GetControls()->Add((CXTPControl*)m_pToolbarProgressCtrl);
Is there any other way to make progress control marquee-style on the command bar ?
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 24 July 2009 at 4:12am |
|
Hi,
Check \Samples\CommandBars\CommonControls - shows how add standard controls to toolbar.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |