Custom Non-Client area - Problems with the menu-bar

Hello guys!

I'm using WM_NCCALCSIZE to calculate a new size for the non-client area,
and WM_NCPAINT to draw my own title bar, min/max buttons etc...

The problem is that the menubar is trying to stay in the original position
which puts it in the middle of my custom title bar...

How do I deal with the menubar?

I can maybe create a control that uses GetMenu() and draws the menu, then
handling the mouse events, but that would be my 2nd choice, and it also will
consume the client area; Is there a better way?

Thanks,
Dani




0
anonymous (74722)
8/14/2007 2:43:35 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
921 Views

Similar Articles

[PageSpeed] 31

You could do a SetMenu(NULL) to disable the default menus on your SDI/
MDI app.
You can then draw your own menus on your NC client area.

-Seetharam

0
smisro (101)
8/14/2007 2:24:07 PM
I'm not using MDI framework... And my question is not how to draw them, but 
how to make windows know where the menu is supposed to be, so clicking in 
the RIGHT position will open the menus...
Of course I can draw everything myself, and handle mouse messages and 
everything,
but maybe there's a simpler way...

"Seetharam" <smisro@gmail.com> wrote in message 
news:1187101447.808974.105260@w3g2000hsg.googlegroups.com...
>
> You could do a SetMenu(NULL) to disable the default menus on your SDI/
> MDI app.
> You can then draw your own menus on your NC client area.
>
> -Seetharam
> 


0
anonymous (74722)
8/14/2007 3:29:13 PM
Reply:

Similar Artilces: