How to draw in the nonclient area?
问题 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