CListBox - controlling horizonall scroll
- From: "David Webber" <dave@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 1 Aug 2005 21:45:49 +0100
I am deriving a control from an owner draw CListBox.
I set the width of the list with SetHorizontalExtent()
It is wider than its client area and I get horizontal scroll bar as
desired.
Now when I press a given key I want it to scroll horizontally to a
position I have calculated.
I am catching the key press with VKeyToItem() - so far so good.
But trying to get it to scroll is driving me mad!
Any ideas on how to achieve this?
Dave
--
David Webber
Author MOZART the music processor for Windows -
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm
[PS My first guess was
SetScrollPos( SB_HORZ, nPos, FALSE );
SendMessage( WM_HSCROLL, WPARAM(SB_THUMBPOSITION), LPARAM(0) );
but whatever nPos is the OnHScroll() handler receives nPos=0 and
nothing happens. ]
.
- Follow-Ups:
- Re: CListBox - controlling horizonall scroll
- From: David Webber
- Re: CListBox - controlling horizonall scroll
- From: David Webber
- Re: CListBox - controlling horizonall scroll
- Prev by Date: Re: Macro Problems
- Next by Date: Re: Macro Problems
- Previous by thread: Macro Problems
- Next by thread: Re: CListBox - controlling horizonall scroll
- Index(es):
Relevant Pages
|