Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WM_RBUTTONDOWN/UP vs WM_CONTEXT_MENU

217 views
Skip to first unread message

Olaf van der Spek

unread,
May 22, 1999, 3:00:00 AM5/22/99
to
Hi,

What's the exact difference between those two? To me, they seem to do the
same.

--

Olaf van der Spek
Almere, Holland
Sp...@EuroNet.NL
http://www.euronet.nl/users/spek/

David Lowndes

unread,
May 23, 1999, 3:00:00 AM5/23/99
to
>What's the exact difference between those two? To me, they seem to do the
>same.

Olaf,

The WM_RBUTTONxxx messages are the basic messages generated by the
mouse driver. The WM_CONTEXTMENU message is a notification message
sent when the default message handler processes those raw messages.

The WM_CONTEXTMENU message is also send for the keyboard operations
Shift+F10, and (if you've got a new keyboard) the context menu key. So
it is the proper message to handle, rather than the mouse specific
ones.

Dave
----
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.

Olaf van der Spek

unread,
May 24, 1999, 3:00:00 AM5/24/99
to
Ok, but what if I would like to decide myself whether or not to display a
context menu or to do some other action?
Which handler should Iuse then?

David Lowndes heeft geschreven in bericht
<37485ee7...@msnews.microsoft.com>...

David Lowndes

unread,
May 24, 1999, 3:00:00 AM5/24/99
to
>Ok, but what if I would like to decide myself whether or not to display a
>context menu or to do some other action?
>Which handler should Iuse then?

Use WM_CONTEXTMENU - if you don't use that you'll miss handling the
keyboard activation method.

If you're trying to circumvent something (like the standard popup that
an edit controls has), handle WM_CONTEXTMENU, do your own code, and
don't pass that message to the default handler.

0 new messages