Center Aligning the right mouse click menu

  • Thread starter Thread starter Sundar
  • Start date Start date
S

Sundar

Hi

I would like to center align the menu that gets displayed when right mouse
is clicked. In MFC, the function TrackPopupMenu takes a parameter that
determines the alignment of the menu (left, right or centered). How do I do
that in C#?

Regards
Sundar
 
Sundar,

It appears that you will have to handle the displaying of the menu
yourself. To do this, you will probably have to handle the right click
event for the control (or whenever you want the context menu to pop up).
Once you have that, you will have to call the TrackPopupMenu method yourself
through the P/Invoke layer.

Hope this helps.
 
Back
Top