我界面中的ClistCtrl 和CTreeCtrl在窗口拖动大小是很闪烁,怎么解决呢

akang1982 2006-09-12 09:32:24
我界面中的ClistCtrl 和CTreeCtrl在窗口拖动大小是很闪烁,怎么解决呢
...全文
209 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
jkgl548 2006-09-13
  • 打赏
  • 举报
回复
study
scottliu 2006-09-13
  • 打赏
  • 举报
回复
指定父窗口风格为WM_CLIPCHILD
DentistryDoctor 2006-09-12
  • 打赏
  • 举报
回复
这段时间代码写在OnSize中,当然闪了。
响应鼠标事件,停止拖动时再定位子窗口?
akang1982 2006-09-12
  • 打赏
  • 举报
回复
void CMidPanel::OnSize(UINT nType, int cx, int cy)
{
CWnd::OnSize(nType, cx, cy);
if(m_pContentList&& m_pContentList->GetSafeHwnd())
{
m_pContentList->LockWindowUpdate();
CRect ctrRect(CRect(0,theApp.skin.GetMidPanelTopHeight(),cx,cy - theApp.skin.GetMidPanelBottomHeight()));
m_pContentList->MoveWindow(ctrRect,TRUE);
m_pContentList->UnlockWindowUpdate();
}
}
我用了 但是不起作用
DentistryDoctor 2006-09-12
  • 打赏
  • 举报
回复
在改变窗口大小时对listctrl/treectrl调用LockWindowUpdate

15,976

社区成员

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

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