Posted on 2012-12-25 09:21
盛胜 阅读(468)
评论(2) 编辑 收藏 引用
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);
}