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 » Bug in CExtBarSliderButton? Collapse All
Subject Author Date
Soo Wei Tan Jan 11, 2007 - 3:12 PM

I am using a slider button similar to the one implemented in the AviFrames example. However, I am getting an uninitialized value if I click on the slider button and release it without moving it away from its original position.

The bad value first occurs in the following code:

virtual void OnClick( CPoint point, bool bDown )
{
   CExtBarSliderButton::OnClick(point,bDown);
   TRACE( "OnClick, Scroll Pos: %u\n", m_nScrollPos );	 
}


The value of m_nScrollPos is 3452816845 which is 0xCDCDCDCD. I believe this means the memory is uninitialized. This is weird since it is initialized to 0L in the constructor.

Any help would be greatly appreciated. Thanks!

Soo Wei Tan Jan 24, 2007 - 12:58 PM

Hmmm... I can’t reproduce it anymore. If it does appear again I’ll make a sample to send to you. Thanks!

Soo Wei Tan Jan 12, 2007 - 12:47 PM

I am overriding OnClick() because I only want an action to occur when the user releases the mouse button after dragging. ScrollPosSet() is called for many values when dragging, but I only want the final position of the slider, rather than updated values along the way.

Technical Support Jan 16, 2007 - 11:16 AM

We tried to reproduce this bug with our AviFrames sample but failed. Would you send us your project or a modified version of the AviFrames sample that reproduces the bug?

Technical Support Jan 12, 2007 - 12:19 PM

The m_nScrollPos property is initialized in the CExtBarSliderButton class constructor so the problem hides somewhere in your code. Please let us know what is the reason for overriding the OnClick() virtual method? If you need to know when the scroll position changes, you could override ScrollPosSet() instead.