Professional UI Solutions
Site Map   /  Register


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 » WM_VSCROLL ( SB_LINEDOWN ) sent multiple times Collapse All
Subject Author Date
Chris Anderson Aug 15, 2008 - 7:29 PM

We have a class derived from CExtScrollBar, this class is used to subclassed an existing scroll bar window. There is a problem when the up/down arrow key is clicked : WM_VSCROLL ( wParam = SB_LINEDOWN ) message is sent more than once. The number is random, in the test, it ranges from 15 - 30 times.

in the following function

void CExtScrollBar::ScrollBar_TrackMouseLButtonDown( )

you will see the code snipplet

      case (CExtPaintManager::__ESBMHT_BUTTON_DOWN):

//       bSendScrollingNotification = false;

       if( m_bSendActionNotifications )



         _psbd.m_bHorzBar ? WM_HSCROLL : WM_VSCROLL,


          ( _psbd.m_bHorzBar ? SB_LINERIGHT : SB_LINEDOWN ),






if you put a break point here, then WM_SCROLL message is generated only once. But if you put a TRACE here, you will see the message is generated many times ?

looks like the loop is intended to simulate auto repeat behavior, but it cause a side effect here, is there any attribute or property that can avoid this behavior ?