Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Tracking Messages from CExtBarSliderButton Collapse All
Subject Author Date
Michael Morrison Sep 1, 2005 - 1:15 PM

How do i receive the real-time messages to track the CExtBarSliderButton while it is being pressed and dragged?  I have tried a number of different things with no success.  CExtBarButton has a OnPressedTracking[Start|Stop] but no OnTrack() or similar.


Thanks.


 

Michael Morrison Sep 7, 2005 - 6:11 PM

Is there an easy way to get this control to continue to call the ScrollPosSet method even if they stop moving the mouse? Basically I would like continuous messages while the button is pressed.

Thanks.

Technical Support Sep 8, 2005 - 9:10 AM

You need a solution which is based on the timer. The slider button is not based on the HWND handle. So, create a CExtToolControlBar-derived class, receive timer events in it and re-direct them to the slider button. You can implement the CExtBarSliderButton::OnClick() virtual method in your CExtBarSliderButton-derived class and receive toolbar’s timer messages in it. Your method will have the same body as the original and track the same message loop while slider’s thumb button is being drag-and-dropped. Additionally this message loop should receive toolbar’s timer messages and periodically invoke the CExtBarSliderButton::ScrollPosSet() method as you need.

Michael Morrison Sep 4, 2005 - 9:33 AM

Thanks for the response.  I was using the "Zoom" control from AviFrames as a baseline.  The problem was that I converted the "g_bSinchronizing" variable to be an instance variable rather than static.  The CZoomBarSliderButton constructor does not initialize this to FALSE (because the static initializer did).  This uninitialized variable, coupled with the "if( g_bSinchronizing ) return;" at the top of the ScrollPosSet fooled me into thinking this routine was not being called all the time.  Initializing it to FALSE in my new constructor fixed the problem.

Technical Support Sep 2, 2005 - 12:43 PM

You need to use a CExtBarSliderButton-derived class and override the ScrollPosSet virtual method which is called when the scroll position is changed. Please take a look at the AviFrames sample in which you can find two classes CSeekBarSliderButton and CZoomBarSliderButton, which represent scroll and slider buttons.