nonclient

How to draw in the nonclient area?

こ雲淡風輕ζ 提交于 2019-12-18 15:48:11
问题 I'd like to be able to do some drawing to the right of the menu bar, in the nonclient area of a window. Is this possible, using C++ / MFC? 回答1: Charlie hit on the answer with WM_NCPAINT . If you're using MFC, the code would look something like this: // in the message map ON_WM_NCPAINT() // ... void CMainFrame::OnNcPaint() { // still want the menu to be drawn, so trigger default handler first Default(); // get menu bar bounds MENUBARINFO menuInfo = {sizeof(MENUBARINFO)}; if ( GetMenuBarInfo

Non client painting on aero glass window

Deadly 提交于 2019-12-17 06:27:07
问题 Now Im customizing title bar of my application. My aim is to add one extra button on title bar. Im my previous question people have adviced me the way I can customize non client area. Thats works perfectly except one small thing - glowing ! I can draw glowing in nonclient area but I cannot make it spreads out of the window . I also cant find any resource about this subj. I looked into this sample and made my own test app for investigating non client drawing facilities. Screen shot of my app's

How to draw in the nonclient area?

蓝咒 提交于 2019-11-30 13:45:30
I'd like to be able to do some drawing to the right of the menu bar, in the nonclient area of a window. Is this possible, using C++ / MFC? Charlie hit on the answer with WM_NCPAINT . If you're using MFC, the code would look something like this: // in the message map ON_WM_NCPAINT() // ... void CMainFrame::OnNcPaint() { // still want the menu to be drawn, so trigger default handler first Default(); // get menu bar bounds MENUBARINFO menuInfo = {sizeof(MENUBARINFO)}; if ( GetMenuBarInfo(OBJID_MENU, 0, &menuInfo) ) { CRect windowBounds; GetWindowRect(&windowBounds); CRect menuBounds(menuInfo

Handling WM_NCPAINT “breaks” DWM glass rendering on Vista/Aero

余生颓废 提交于 2019-11-27 23:01:53
I am trying to make a window that alternates between having an Aero/Glass and a custom rendered frame (by handling WM_NCPAINT ) based on a user setting. (Windows Vista). DwmComposition is enabled. My app comes up with the glass frame, but as soon as I toggle the setting to trigger the custom WM_NCPAINT codepath then toggle back to use DefWindowProc 's WM_NCPAINT handling, the native frame is now perpetually stuck in the "Vista Basic" style - it's no longer translucent and the caption buttons look different to the normal Aero/Glass ones. I've tried just about every way of poking the window from

Non client painting on aero glass window

旧时模样 提交于 2019-11-27 00:09:32
Now Im customizing title bar of my application. My aim is to add one extra button on title bar. Im my previous question people have adviced me the way I can customize non client area. Thats works perfectly except one small thing - glowing ! I can draw glowing in nonclient area but I cannot make it spreads out of the window . I also cant find any resource about this subj. I looked into this sample and made my own test app for investigating non client drawing facilities. Screen shot of my app's window: So you can see that system button glows out of the windows when my is clipped by borderframe.

Handling WM_NCPAINT “breaks” DWM glass rendering on Vista/Aero

半世苍凉 提交于 2019-11-26 21:17:42
问题 I am trying to make a window that alternates between having an Aero/Glass and a custom rendered frame (by handling WM_NCPAINT ) based on a user setting. (Windows Vista). DwmComposition is enabled. My app comes up with the glass frame, but as soon as I toggle the setting to trigger the custom WM_NCPAINT codepath then toggle back to use DefWindowProc 's WM_NCPAINT handling, the native frame is now perpetually stuck in the "Vista Basic" style - it's no longer translucent and the caption buttons