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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top