Thursday, 8 August 2013

MFC,How to add menu-bar and customise button to title bar?

MFC,How to add menu-bar and customise button to title bar?

Recently I found many app add menu-bar to title bar. For visualisation,
the min, max and close button in title bar alse are overrided.
I just know to process the special gdi operation in WM_NCPAINT, but I
don't know how to process. I google for it, but I cann't get the key.
Can anyone give me some tips? BTW, I'm not looking for Ribbon style.
I don't like the way to suppress the system border, then decrease the size
of client, then draw customised bar on decreased room. This way also
suppress some system message such as ALT + Space(system menu).
It's the best to show the demo app with source, printing the principle of
draw customised titlebar is OK.
My Environment:
OS: Win7/Win8 IDE: VS2012

No comments:

Post a Comment