15,908,274 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by olid4 (Top 7 by date)
olid4
20-Jan-14 1:57am
View
Yes, I have already tried this once and it worked quite well. But I thought there could be a better and easier way, because this isn't very precisely:
return !(Rect.Height() > GetCount() * GetItemHeight(0) + (CBI.rcButton.bottom - CBI.rcButton.top) + 4);
olid4
17-Jan-14 8:54am
View
BOOL HasVertScrollbar() const
{
bool bVisible = false;
if( GetLBox().GetStyle() & WS_VSCROLL )
{
SCROLLBARINFO sbInfo;
sbInfo.cbSize = sizeof( SCROLLBARINFO );
if( GetLBox().GetScrollBarInfo( OBJID_VSCROLL, &sbInfo ) )
{
// Index 0 = Scrollbar
if( ( sbInfo.rgstate[0] & ( STATE_SYSTEM_INVISIBLE | STATE_SYSTEM_UNAVAILABLE ) ) == 0 )
{
bVisible = true;
}
}
}
else
{
CWnd* pScrollWnd = GetLBox().GetScrollBarCtrl( SB_VERT );
if( pScrollWnd && pScrollWnd->IsKindOf( RUNTIME_CLASS( CScrollBar ) ) )
{
if( pScrollWnd->IsWindowVisible() )
{
bVisible = true;
}
}
}
return bVisible;
}
returns always that a scrollbar is visible even when there's no scrollbar visible
olid4
17-Jan-14 7:59am
View
Your updated Code always sais false in my case, because GetScrollBarCtrl returns always 0x00.
olid4
17-Jan-14 7:55am
View
Sorry again!
=> Updated!
olid4
17-Jan-14 7:29am
View
I updated my question.
I will try to work with GetScrollBarCtrl().
olid4
17-Jan-14 7:20am
View
Sorry, I didn't mean CListCtrl. Instead I need the corresponding function for a CListBox.
olid4
17-Jan-14 7:20am
View
Sorry, I didn't mean CListCtrl. Instead I need the corresponding function for a CListBox.
Show More