Solved

CListCtrl:: Remove HScroll

Posted on 1998-11-02
4
797 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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
lucky13 challenge 11 158
Unix Command -- Challenging  question 7 101
Change to event 1 126
JQuery serialize and unserialize 8 184
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

735 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