Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 803
  • Last Modified:

CListCtrl:: Remove HScroll

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
samyee
Asked:
samyee
1 Solution
 
f4817Commented:
Hello,
which kind of list is your CListCtr?
0
 
samyeeAuthor Commented:
A CCtrlList in Report view.... I dun really understand ur question??
0
 
atariCommented:
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
 
SullenCommented:
void CMyListCtrl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
....................................................
....................................................
this->ShowScrollBar (SB_HORZ,FALSE);
// or [this->SetScrollRange(SB_HORZ,0,0);]
}
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now