挖空窗口某个区域

virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
挖空窗口某个区域函数
LRESULT *****::DefWindowProc( UINT message, WPARAM wParam, LPARAM lParam )
{
// TODO: 在此添加专用代码和/或调用基类
LRESULT lrst = CDialog::DefWindowProc(message, wParam, lParam);
if (!::IsWindow(m_hWnd))
{
return lrst;
}
//窗口的移动、重绘、非客户区重绘、非客户激活
if (message==WM_MOVE||message==WM_PAINT||message==WM_NCPAINT||message==WM_NCACTIVATE/* ||message == WM_NOTIFY*/)  
{  
CDC* pWinDC = GetWindowDC();
CRect rctBtn;
CRect rctWnd;
GetWindowRect(&rctWnd);
pWinDC->ExcludeClipRect(rctWnd.Width()-26,5,rctWnd.Width()-26+22,27);
if (pWinDC)  
DrawTitleBar(pWinDC); //边框重绘函数 
ReleaseDC(pWinDC);  
}
return lrst; 
//return CDialog::DefWindowProc(message, wParam, lParam);
}

你可能感兴趣的:(挖空窗口某个区域)