Click here to Skip to main content
15,921,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My intention is to dispay a floating menu when user right click on the tab control(it has minimum size and no client area)
My plan was to respond to NM_RCLICK notification for the tab control but the associated hdr structure does have any information about the point at which the mouse was clicked.I need the point at which the mouse was clicked.That's where I intend to display my floating menu.How do I solve this problem.
Or does the parent window of a tab control receive a WM_RBUTTONDOWN when the tab control is right clicked?
Or does it make sence to attempt to respond to WM_NCRBUTTONDOWN for the tab control?
Posted

I think you can do it by calling GetCursorPos[^] to get the scrren coordinates of the mouse. You then use ScreenToClient[^] to get that position relative to the Window.
 
Share this answer
 
Inside the event handler: request the mouse's coordinates via the Mouse's GetPosition method.

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900