Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Status bar scroll control issue
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Status bar scroll control issue

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

Joined: 16 June 2008
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote vijaymahajan Quote  Post ReplyReply Direct Link To This Post Topic: Status bar scroll control issue
    Posted: 21 July 2008 at 2:46am
Hello,
i have created slider control in a status bar in my Mdi application.
 
pZoomPane = (CXTPStatusBarSliderPane*)m_wndStatusBar.AddIndicator(new CXTPStatusBarSliderPane(), ID_STATUSBAR_ZOOMSLIDER);pZoomPane->SetBeginGroup(FALSE);pZoomPane->SetWidth(130);pZoomPane->SetPos(100); pZoomPane->SetRange(10, 349);pZoomPane->SetCaption(_T("&Zoom Slider"));pZoomPane->SetTooltip(_T("Zoom"));pZoomPane->SetTooltipPart(XTP_HTSCROLLUP, _T("Zoom Out"));pZoomPane->SetTooltipPart(XTP_HTSCROLLDOWN, _T("Zoom In"));
 
I write the event handler for it like this.

ON_NOTIFY(XTP_SBN_SCROLL, ID_STATUSBAR_ZOOMSLIDER, OnZoomSliderScroll)

We have our zoomIn(),zoomOut() functions in our application. i just have to map these function to scroll position.

But i am not able to trace the movement of the scroll,wheather it is in forward direction or in backward,so i am not able to call our zoomIn and ZoomOut Functions accordingly.
Can i trace the movement in ON_NOTIFY event handler? or i will have to write the OnScroll() event handler compulsaryly?
 
Please guide me accordingly.
 
Thanks And Regards,
Vijay.
Back to Top
Smucker View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 February 2008
Status: Offline
Points: 156
Post Options Post Options   Thanks (0) Thanks(0)   Quote Smucker Quote  Post ReplyReply Direct Link To This Post Posted: 21 July 2008 at 3:05am
Does your application not have a zoomTo() or similar function where you can set the zoom % directly? Without that, you'll need to save the prior position and compute the difference, and call zoomIn or zoomOut the appropriate number of times. In this case, you'll want the range to be (-outmax, +inmax), where outmax is the most number of times you can zoom out and inmax is the most times you can zoom in.



Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)

Platform: Windows 200x/XP/Vista/Win7 (32/64 bit)

Language: Visual C++ 9.0 (Studio 2008)

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.141 seconds.