Solved

VScrollBar in a CListCtrl

Posted on 2002-06-12
6
594 Views
Last Modified: 2013-11-20
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.

0
Comment
Question by:yoavo
  • 3
  • 3
6 Comments
 
LVL 12

Accepted Solution

by:
migel earned 100 total points
ID: 7074816
Hi!
this method alvays returns NULL for windows that implements scrollbar via  windows styles.
Try use GetSrcollInfo to determine is scrollbar visible
0
 

Author Comment

by:yoavo
ID: 7074901
Hi migel,
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.
0
 
LVL 12

Expert Comment

by:migel
ID: 7074944
Hi!
did you include mask SIF_RANGE?
does nMin == nMax??
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:yoavo
ID: 7074965
I included SIF_ALL (which is the default):
BOOL GetScrollInfo( int nBar, LPSCROLLINFO lpScrollInfo, UINT nMask = SIF_ALL );

mMin is always 0...
0
 
LVL 12

Expert Comment

by:migel
ID: 7074994
nMax ?
0
 

Author Comment

by:yoavo
ID: 7075023
nMax depands on the height of the control.
I think if (nPage <= nMax) then the scroll appears...
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now