toolbar重绘函数EraseNonClient//DrawBorders(&dc, rectWindow);//函数什么意思呢???

mirroatl47 2012-11-18 09:14:11

void CToolBarEx::EraseNonClient()
{
// get window DC that is clipped to the non-client area
CWindowDC dc(this);
CRect rectClient;
GetClientRect(rectClient);
CRect rectWindow;
GetWindowRect(rectWindow);
ScreenToClient(rectWindow);
rectClient.OffsetRect(-rectWindow.left, -rectWindow.top);
dc.ExcludeClipRect(rectClient);

// draw borders in non-client area
rectWindow.OffsetRect(-rectWindow.left, -rectWindow.top);
DrawBorders(&dc, rectWindow);//函数什么意思呢???

// erase parts not drawn
dc.IntersectClipRect(rectWindow);
SendMessage(WM_ERASEBKGND, (WPARAM)dc.m_hDC);//函数是什么作用呢???

DrawGripper(&dc, rectWindow); //
}




...全文
95 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
快乐鹦鹉 2012-11-18
  • 打赏
  • 举报
回复
注释写了啊,DrawBorder是要在非客户区域绘制边界线条 EraseNonClient是擦除非客户区域内容,就是进行重画啦 SendMessage(WM_ERASEBKGND, (WPARAM)dc.m_hDC);告诉工具条,响应WM_EARSEBKGND,重画工具条背景

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧