yoavo
asked on
VScrollBar in a CListCtrl
Hi,
I need to know if a Vertical ScrollBar is shown in a CListCtrl. I tried to use:
CScrollBar* CWnd::GetScrollBarCtrl(int ) const,
but it does not work (returns NULL, unless class derive from CView...).
thanks,
Yoav.
I need to know if a Vertical ScrollBar is shown in a CListCtrl. I tried to use:
CScrollBar* CWnd::GetScrollBarCtrl(int
but it does not work (returns NULL, unless class derive from CView...).
thanks,
Yoav.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi!
did you include mask SIF_RANGE?
does nMin == nMax??
did you include mask SIF_RANGE?
does nMin == nMax??
ASKER
I included SIF_ALL (which is the default):
BOOL GetScrollInfo( int nBar, LPSCROLLINFO lpScrollInfo, UINT nMask = SIF_ALL );
mMin is always 0...
BOOL GetScrollInfo( int nBar, LPSCROLLINFO lpScrollInfo, UINT nMask = SIF_ALL );
mMin is always 0...
nMax ?
ASKER
nMax depands on the height of the control.
I think if (nPage <= nMax) then the scroll appears...
I think if (nPage <= nMax) then the scroll appears...
ASKER
I tried using GetScrollInfo, and I am not sure I can get from the SCROLLINFO structure if a scroll bar exist or not.
The only thing I found out is that when a scroll bar does not exist then then in the SCROLLINFO struct: nPage > nMax
can I trust this ???
Yoav.