Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 71573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:54:32+00:00 2026-05-10T19:54:32+00:00

Just wondering what the difference between MFC control messages prefixed with the following is:

  • 0

Just wondering what the difference between MFC control messages prefixed with the following is:

LVN (e.g. LVN_ITEMCHANGED) HDN (e.g. HDN_TRACK) NM (e.g. NM_HOVER) 

Also, I am using a ListControl and trapping when the user clicks on an item using the NM_CLICK message. I also want to trap when a user selects a new item view a key e.g. up/down arrow keys. Can anyone tell me which message I should be trapping for this?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T19:54:33+00:00Added an answer on May 10, 2026 at 7:54 pm

    For change in selection, you need to handle the LVN_ITEMCHANGED notification:

    NMLISTVIEW & nm = *(NMLISTVIEW *) pnmh; if (  (nm.uNewState ^ nm.uOldState) & LVIS_SELECTED)  {         // nm.iItem was selected or deselected    if (!m_internalUIChange)    {       // see below    } } 

    The first ‘if’ checks if the ‘selected’ state has changed. Note that, when selecting a different item in the list, this still fires twice: once for the old item to be deselected, and once for the new item to be selected. This is necessary, however, to fetch a ‘complete deselect’.

    This notification fires very often – even when you modify the control programmatically. If your handler should react only to user events, you will need at least a flag that you set durign these operations (I use a class together with a RAII-Lock for that, so I don’t forget to reset it)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was just wondering what (if any) the difference was between the following two
Just wondering what the difference is between these two and what the benefit for
just wondering the difference between the presence of the last comma in the array,
I was just wondering what the difference between .cpp and .h files is? What
I am just wondering what is the difference between these two File1.js $(function() {
just wondering what the subtle difference between an array and a range is. I
What is the difference between mysqli_connect and mysql_connect? I'm just wondering when I should
I'm just wondering. What's the difference in PHP between setting a cookie without expiration
I'm just wondering what the difference is between the two. I have noticed the
Just wondering what the difference between BeginInvoke() and Invoke() are? Mainly what each one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.