Can I draw a menu (not a popup menu) in any rectangular area of ​​a window with MFC?

I am overriding the OnNcPaint () method along with the OnNcLButtonDown () and OnNcMouseMove () and OnNcHitTest () methods. Therefore, the original window menu does not exist. I want to add a menu with a label area. How can i do this?

Many thanks!

0


source to share


1 answer


The menu is colored as part of the non-client area. So if you are doing your own non-client painting, you will have to paint the window yourself as well. You can hack something with TrackPopupMenu to do the actual drawing of the menu and you just need to handle the top level menu and menu items yourself.

Drawing a non-client area is dangerous in itself. Are you sure you don't want to use the owner of the menu picture ?



It might be tempting to customize your UI dialogs to suit your specific needs, but also keep in mind that this is annoying for users who are already used to the look of windows.

+1


source







All Articles