Solved

ListBox messages

Posted on 1997-08-08
3
358 Views
Last Modified: 2013-11-19
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
Comment
Question by:d94stein
3 Comments
 
LVL 3

Expert Comment

by:jaba
Comment Utility
Why you using ListBox and headerCtrl ? Why not CListView in Report form ?

0
 
LVL 3

Accepted Solution

by:
byang earned 80 total points
Comment Utility
Check the properties of the listbox and header ctrl in resource editor, they should have "notify parent" checked.
0
 

Author Comment

by:d94stein
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now