From: andrew7 <bd...@us...> - 2005-11-19 03:14:11
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12648/include/smartwin Modified Files: MessageMap.h Log Message: Prevent double scroll events Index: MessageMap.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/MessageMap.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- MessageMap.h 25 Oct 2005 10:40:13 -0000 1.15 +++ MessageMap.h 19 Nov 2005 03:14:02 -0000 1.16 @@ -288,7 +288,7 @@ ++idx ) { // TODO: Should we implement our own RTTI for uses such as this? - // TODO: Should also become a spesialization... + // TODO: Should also become a specialization... // to make things go faster etc... WidgetMenu<WindowOriginalType, WidgetMessageMapType> * ptr = dynamic_cast<WidgetMenu<WindowOriginalType, WidgetMessageMapType> *>( *idx ); #ifndef WINCE @@ -327,7 +327,12 @@ } else if( (msg == WM_VSCROLL || msg == WM_HSCROLL) && (*idx)->handle() == (HANDLE)lPar ) { - return (*idx)->sendWidgetMessage( hWnd, msg, wPar, lPar ); + int scrollReq= ( wPar & 0xf ); // SB_THUMBPOSITION(4) or SB_ENDSCROLL(8) + if ( SB_ENDSCROLL == scrollReq ) { + return WidgetMessageMapType::returnFromUnhandledWindowProc( hWnd, msg, wPar, lPar ); + } else { + return (*idx)->sendWidgetMessage( hWnd, msg, wPar, lPar ); + } } else if( msg == WM_DRAWITEM && (*idx)->handle() == reinterpret_cast<DRAWITEMSTRUCT*>(lPar)->hwndItem ) { |