Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - slider control on toolbar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

slider control on toolbar

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

Joined: 07 January 2009
Location: United Kingdom
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamesP Quote  Post ReplyReply Direct Link To This Post Topic: slider control on toolbar
    Posted: 12 January 2009 at 11:27am
Could someone tell me how to add a slider control on the toolbar. We would like to have our zoom control there with a + and - button.
 
I've got code like this:
 
CSliderCtrl wndSliderCtrl;
wndSliderCtrl.Create(TBS_HORZ | WS_CHILD | WS_VISIBLE, CRect(0, 0, 200, 16), &m_wndStatusBar, IDC_SLIDER);
m_wndStatusBar.AddIndicator(ID_INDICATOR_SLIDER, iIndex);
int nIndex = m_wndStatusBar.CommandToIndexID_INDICATOR_SLIDER);
m_wndStatusBar.SetPaneWidth(nIndex, 200);
m_wndStatusBar.SetPaneStyle(nIndex, m_wndStatusBar.GetPaneStyle(nIndex) | SBPS_NOBORDERS);
m_wndStatusBar.AddControl(&m_wndSliderCtrl, ID_INDICATOR_SLIDER, FALSE);
 
This produces a slider control with the normal grey background rather than the Office2007 theme I'm using. Should I be using CXTPControlSlider?
 
I've seen reference to using CXTPControlScrollBar with a slider style in version 12 but we only have version 11.2.
 
Any help would be greatly appreciated.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 13 January 2009 at 6:31am
Hi,
 
With 11.2 you can only use standard slider that will have gray background. :(
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
JamesP View Drop Down
Groupie
Groupie
Avatar

Joined: 07 January 2009
Location: United Kingdom
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamesP Quote  Post ReplyReply Direct Link To This Post Posted: 14 January 2009 at 5:43am
I upgraded to version 12 and that gave me the solution with examples that I needed, 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.062 seconds.