Print Page | Close Window

Status bar scroll control issue

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=11505
Printed Date: 01 October 2024 at 8:30pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Status bar scroll control issue
Posted By: vijaymahajan
Subject: Status bar scroll control issue
Date 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.



Replies:
Posted By: Smucker
Date 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)




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