Solved

ListBox messages

Posted on 1997-08-08
3
394 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
ID: 1303386
Why you using ListBox and headerCtrl ? Why not CListView in Report form ?

0
 
LVL 3

Accepted Solution

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

Author Comment

by:d94stein
ID: 1303388
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 Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

828 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