Solved

VScrollBar in a CListCtrl

Posted on 2002-06-12
6
640 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

688 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