VC中TabCtrl控件如何像对话框一样具有Resizing属性. RT.对话的Border有Resizing属性,但是TabCtrl没有,怎么才能让它有呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你要自己派生一个类来实现响应OnNcHitTest处理即可 LRESULT CTreeFile::OnNcHitTest(CPoint point){ // TODO: 在此添加消息处理程序代码和/或调用默认值 CRect rect; GetWindowRect(&rect); if(point.x <= rect.left+3) return HTLEFT; else if(point.x >= rect.right-3) return HTRIGHT; else if(point.y <= rect.top+3) return HTTOP; else if(point.y >= rect.bottom-3) return HTBOTTOM; else if(point.x <= rect.left+10 && point.y <= rect.top+10) return HTTOPLEFT; else if(point.x >= rect.right-10 && point.y <= rect.top+10) return HTTOPRIGHT; else if(point.x <= rect.left+10 && point.y >= rect.bottom-10) return HTBOTTOMLEFT; else if(point.x >= rect.right-10 && point.y >= rect.bottom-10) return HTBOTTOMRIGHT; return CTreeCtrl::OnNcHitTest(point);} LRESULT CTreeFile::OnNcHitTest(CPoint point){ // TODO: 在此添加消息处理程序代码和/或调用默认值 CRect rect; GetWindowRect(&rect); if(point.x <= rect.left+3) return HTLEFT; else if(point.x >= rect.right-3) return HTRIGHT; else if(point.y <= rect.top+3) return HTTOP; else if(point.y >= rect.bottom-3) return HTBOTTOM; else if(point.x <= rect.left+10 && point.y <= rect.top+10) return HTTOPLEFT; else if(point.x >= rect.right-10 && point.y <= rect.top+10) return HTTOPRIGHT; else if(point.x <= rect.left+10 && point.y >= rect.bottom-10) return HTBOTTOMLEFT; else if(point.x >= rect.right-10 && point.y >= rect.bottom-10) return HTBOTTOMRIGHT; return CTreeCtrl::OnNcHitTest(point);} 360不能抓包? MFC如何定义自己的控件? basic_string 重定义错误. CFtpFileFind 返回的目录名错误 着急!! 问点基础性的问题 。 二维数组的问题? 设值CEdit控件的有效字符,怎样包括前删和后删(delete)键? 如何用vc实现windows xp风格的对话框,请大虾给出代码,100分为谢 我是个新来的,请问我这样做对吗? 视图只要一改变就响应的消息函数有什么? VS2010环境下Access数据库远程连接问题! CListBox问题
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
CRect rect;
GetWindowRect(&rect);
if(point.x <= rect.left+3)
return HTLEFT;
else if(point.x >= rect.right-3)
return HTRIGHT;
else if(point.y <= rect.top+3)
return HTTOP;
else if(point.y >= rect.bottom-3)
return HTBOTTOM;
else if(point.x <= rect.left+10 && point.y <= rect.top+10)
return HTTOPLEFT;
else if(point.x >= rect.right-10 && point.y <= rect.top+10)
return HTTOPRIGHT;
else if(point.x <= rect.left+10 && point.y >= rect.bottom-10)
return HTBOTTOMLEFT;
else if(point.x >= rect.right-10 && point.y >= rect.bottom-10)
return HTBOTTOMRIGHT; return CTreeCtrl::OnNcHitTest(point);
}
LRESULT CTreeFile::OnNcHitTest(CPoint point)
{
// TODO: 在此添加消息处理程序代码和/或调用默认值
CRect rect;
GetWindowRect(&rect);
if(point.x <= rect.left+3)
return HTLEFT;
else if(point.x >= rect.right-3)
return HTRIGHT;
else if(point.y <= rect.top+3)
return HTTOP;
else if(point.y >= rect.bottom-3)
return HTBOTTOM;
else if(point.x <= rect.left+10 && point.y <= rect.top+10)
return HTTOPLEFT;
else if(point.x >= rect.right-10 && point.y <= rect.top+10)
return HTTOPRIGHT;
else if(point.x <= rect.left+10 && point.y >= rect.bottom-10)
return HTBOTTOMLEFT;
else if(point.x >= rect.right-10 && point.y >= rect.bottom-10)
return HTBOTTOMRIGHT; return CTreeCtrl::OnNcHitTest(point);
}