Solved

CListCtrl header click event

Posted on 2002-07-18
1
691 Views
Last Modified: 2013-11-20
How do i catch a mouse click event pressing the header
of a CListCtrl ?
I add the event to the code but, when pressing the table's header, there is no callback to the receiving function.
0
Comment
Question by:eliad
1 Comment
 
LVL 16

Accepted Solution

by:
imladris earned 100 total points
ID: 7162406
I ran into this problem. peterchen provided a solution along the following lines:

a) After adding a message handler, in the message map, you find something like:
ON_NOTIFY_REFLECT(HDN_ITEMCLICK, OnItemclick)

change this to two lines:
 ON_NOTIFY(HDN_ITEMCLICKA, 1, OnItemclick)
 ON_NOTIFY(HDN_ITEMCLICKW, 1, OnItemclick)

b) in OnInitialUpdate(), do
 GetListCtrl().GetHeaderCtrl()->SetDlgCtrlID(1);


To see the full discussion you can check the PAQ at:

http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=mfc&qid=20094826
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
windows 10 how make picture as desktop background 2 62
move a line in eclipse 3 102
Smart Camera scanning and reading information 3 106
sum28 challenge 31 112
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

777 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