Solved

CListCtrl:: Remove HScroll

Posted on 1998-11-02
4
799 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
[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
4 Comments
 

Expert Comment

by:f4817
ID: 1324144
Hello,
which kind of list is your CListCtr?
0
 

Author Comment

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

Accepted Solution

by:
atari earned 20 total points
ID: 1324146
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
ID: 26100647
void CMyListCtrl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
....................................................
....................................................
this->ShowScrollBar (SB_HORZ,FALSE);
// or [this->SetScrollRange(SB_HORZ,0,0);]
}
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

630 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