Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

NM_RCLICK vs. WM_RBUTTONDOWN

Posted on 1998-05-13
1
Medium Priority
?
782 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 200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Screencast - Getting to Know the Pipeline
Suggested Courses

916 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