Status bar scroll control issue |
Post Reply |
Author | |
vijaymahajan
Groupie Joined: 16 June 2008 Status: Offline Points: 92 |
Post Options
Thanks(0)
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.
|
|
Smucker
Senior Member Joined: 02 February 2008 Status: Offline Points: 156 |
Post Options
Thanks(0)
|
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) |
|
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 |