CListView OnRButtonUp message handler

bree2474
bree2474 used Ask the Experts™
on
I have a couple of classes that are derived from CListView, and I want a popup menu to appear when the righ button is released.  For some strange reason, nothing happens when I release the right button, but when i double-click it, I get the desired result.  My message handler is for OnRButtonUp, why is this happening, and how can I fix it?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Try to handle WM_CONTEXTMENU.

Author

Commented:
Ok, that solved that problem, but created another.  I have 4 views in 1 CMDIChildFrm.  When I right click on an item in the listctrl of one of the views, it does not display the popup menu where I clicked.  It seems to disply it relative to the child frame rather than the view.  I'm assuming that the point needs to be converted.  How would I do this?

Author

Commented:
Never mind, I figured it out myself.  It's
ScreenToClient(&point);

Thanks for the hint.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial