subclass
WM_MOUSEWHEEL
WM_HSCROLL
WM_VSCROLL
GetScrollInfo
case WM_MOUSEWHEEL: { // determine if treeview control has visible vertical scrollbar LONG_PTR WindowStyle = GetWindowLongPtr( hwnd, GWL_STYLE ); if( WindowStyle & WS_VSCROLL ) { SCROLLINFO si; ZeroMemory(&si, sizeof(si)); si.cbSize = sizeof(SCROLLINFO); si.fMask = SIF_ALL; GetScrollInfo( hwnd, SB_VERT, &si ); // here is the problem: I do not know how to formulate the condition if( /* currentPosition > Min or currentPosition < Max value */ ) return 0L; // handle it by doing nothing // otherwise do our stuff } } return 0L; // if scrollbar is not visible handle it by doing nothing
SetScrollRange
InvalidateRect()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)