• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 419
  • Last Modified:

ListBox messages

I have created a class (CReportCtrl) derived from
CWnd that contains a CHeaderCtrl and a CListBox.
The CListBox is ownerdrawn and I can catch WM_MEASUREITEM
and WM_DRAWITEM in CReportCtrl. But I can't catch some
messages like WM_HSCROLL from the CListBox.
How can I catch this message ?

I would also want to catch NM_RETURN or something so
a doubleclick is performed when the user selects an
item and then press return.
How ?
0
d94stein
Asked:
d94stein
1 Solution
 
jabaCommented:
Why you using ListBox and headerCtrl ? Why not CListView in Report form ?

0
 
byangCommented:
Check the properties of the listbox and header ctrl in resource editor, they should have "notify parent" checked.
0
 
d94steinAuthor Commented:
The reason I didn't use CListView is that I couldn't
find a to change the font. When I tried the text was
clipped becauase the height of the items remained the
same. So I decided to make a better control of my own.
But if someone has a sollusion for changing font in
the CListView please send it to me at d94stein@isy.liu.se

0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

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