Solved

CListCtrl:: Remove HScroll

Posted on 1998-11-02
4
790 Views
Last Modified: 2013-11-20
Q1) I wish to remove away the HScroll of the CListCtrl in report view but not the VScroll....

The only properties that I can find is the <No Scroll> option found in the Extended Style...

BUT I still need the VScroll but NOT the buttom HScroll...
0
Comment
Question by:samyee
4 Comments
 

Expert Comment

by:f4817
Comment Utility
Hello,
which kind of list is your CListCtr?
0
 

Author Comment

by:samyee
Comment Utility
A CCtrlList in Report view.... I dun really understand ur question??
0
 
LVL 1

Accepted Solution

by:
atari earned 20 total points
Comment Utility
Sorry, that's only a try, because I never tested it:

Couldn't you do it this way:
pListCtrl->ModifyStyle(WS_HSCROLL,0);

The first parameter of ModifyStyle says, that you want to remove the horizontal scroll bar, the second parameter say, that you want to add no other window-style.

Test it, maybe it works. Try it in OnInitialUpdate() of your view or in OnInitDialog(), if you use a dialog box with a CListCtrl in it.

Hope it works,
bye,
atari
0
 

Expert Comment

by:Sullen
Comment Utility
void CMyListCtrl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
....................................................
....................................................
this->ShowScrollBar (SB_HORZ,FALSE);
// or [this->SetScrollRange(SB_HORZ,0,0);]
}
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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 demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

6 Experts available now in Live!

Get 1:1 Help Now