Solved

NM_RCLICK vs. WM_RBUTTONDOWN

Posted on 1998-05-13
1
761 Views
Last Modified: 2013-11-20
Is there any advantage to handling one message over the other.  I felt that the NM_* messages were more suitable for common controls, but I am not sure.  Is there a technical advantage of one over the other?  I am aware that some of the message handlers provide different additional data (points vs. NMHDR struct), but again I want to know if I get more bang for my buck (speed, performance, etc.) with one over the other.  Thanks.

PS: Although I may be guessing, I feel that handling NM_* messages is slower, but I have not benchmarked this.
0
Comment
Question by:falkland
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
jstolan earned 100 total points
ID: 1310345
The purpose of the WM_NOTIFY messages such as NM_RCLICK is for a control to notify it's parent that a user has clicked on the control.  If the parent is a dialog, for example, it never sees a WM_RBUTTONDOWN message because the event occurred in the child window (the control).

Conversely, if the user clicks on the dialog, the dialog gets the WM_RBUTTONDOWN message but not the NM_RCLICK message.

So you see, the meaning of these messages are quite different, and they should be handled differently.  They are not interchangeable.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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 …
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.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

624 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