int hg = rect1.Height() - (rect1.bottom - rect2.bottom);
m_List1.SetWindowPos(NULL,rect1.left, rect1.top, rect1.Width(),hg, TRUE );你的那个只是将大小改成一样的
解决方案 »
- 怎样修改注册表来实现,用ie请求一个自定义的url,就启动自己写的程序
- 公司不厚道~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- winsock中关于accept()的函数调用问题,请赐教。
- 有谁处理过隔行存储图片?
- IE加载控件没有问题,当销毁控件时,IE崩溃,此情况在特殊情况下出现
- 怎样为通用控件指定资源id?
- 求助操作注冊表的源代碼(解決即給分)
- 在vc中,怎么实现foxmail中的效果???
- 用C++bulider提供的implib.exe从一个dll生成.lib在vc里不能连接怎么办
- 如何评估一个软件
- c++中的运算符重载到底是怎么回事
- 这种界面用什么mfc控件较好,谢谢(附图)
CRect rect1;
m_List1.GetClientRect(rect1);
CRect rect2;
m_List2.GetClientRect(rect2);
CRect rect1;
m_List1.GetClientRect(rect1);
CRect rect2;
m_List2.GetClientRect(rect2);
要求的是 左顶右不变,把底对齐。
rect2.top+rect2.Height()
而不是
rect2.top+rect1.Height()
呢?rect2.top+rect2.Height() 并不会改变 list2 的 bottom 啊……深深地不理解
m_List1.SetWindowPos(NULL,rect1.left, rect1.top, rect1.Width(),i, TRUE );
这里的 i 计算出来是 bottom,可是 SetWindowPos 的参数要求是 height 啊
//列表框1比列表框2高
CRect rect1;
m_List1.GetWindowRect(rect1);//得到的屏幕坐标
CRect rect2;
m_List2.GetWindowRect(rect2);//得到的屏幕坐标 ScreenToClient(rect1);
ScreenToClient(rect2);
if (0 != rect1.bottom - rect2.bottom)
{
int hg = rect1.Height() - (rect1.bottom - rect2.bottom);
m_List1.SetWindowPos(&wndTop,rect1.left, rect1.top, rect1.Width(),hg, SWP_SHOWWINDOW );
}