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
Solved

NM_RCLICK vs. WM_RBUTTONDOWN

Posted on 1998-05-13
1
746 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
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Title # Comments Views Activity
no14 challenge 14 70
zeroMAx challenge 20 111
sumHeights2  challenge 7 114
Trying to run powershell  in a batch file. How do I do this? 8 105
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…
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.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

791 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