Re: Scrollbars and CListCtrl
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Fri, 11 May 2007 10:29:30 -0400
You said it has only one column. Just make sure the width of this column is <= the width
of the client area of the control. If GetClientRect is returning the wrong width, you
could subtract off ::GetSystemMetrics(SM_CXVTHUMB) [if I remember the name correctly,
check GetSystemMetrics) which is the width of the vertical scrollbar thumb.
joe
On Fri, 11 May 2007 08:07:10 GMT, Henryk Birecki <soaringpilot@xxxxxxxxxxxxx> wrote:
I am working with CListCtrl window which has only one column, but IJoseph M. Newcomer [MVP]
really need to suppress appearance of horizontal scroll bar. I tried
to modify window style to remove WS_HSCROLL, but seems that MFC
overrides me. For now I am suppressing it by loading data, getting
client rectangle and setting column width to client rectangle width.
Unfortunately this fails with PocketPC WinMobile 5. There
GetClientRect seems to return rectangle that includes scrollbar. This
adds a problem of now finding the width of vertical scrollbar,
solution to which is not obvious to me.
There must be a better way to suppress horizontal scrollbar in
CListCtrl. Can someone please point me at it, or at least tell me how
to programatically find scroll bar width in CListCtrl.
Thanks,
Henryk Birecki
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Prev by Date: Re: Is Unicode character a vowel?
- Next by Date: Re: Scribble troubleshooting
- Previous by thread: Fullscreen Mode for MFC MDI Application
- Next by thread: deleting a file in VC++ 6.0
- Index(es):
Relevant Pages
|