我现在这一昂设置
[code=C/C++][/
void CClient_agencyDlg::ResizeWindows(int CxBarAt)
{
CRect rcDlg;
CRect rcStatus;
//get control size
GetClientRect(&rcDlg);
// m_ok.GetClientRect(&rcDlg);
m_Pro.GetClientRect(&rcStatus);
// move tree
m_tree.MoveWindow(0,0,CxBarAt-SIZEBAR,rcDlg.bottom-rcStatus.Height());//
// move list file
m_List_File_Info.MoveWindow(CxBarAt,0,rcDlg.right-CxBarAt,rcDlg.bottom - rcStatus.Height());//
}
]
[code=C/C++][/
void CClient_agencyDlg::ResizeWindows(int CxBarAt)
{
CRect rcDlg;
CRect rcStatus;
//get control size
GetClientRect(&rcDlg);
// m_ok.GetClientRect(&rcDlg);
m_Pro.GetClientRect(&rcStatus);
// move tree
m_tree.MoveWindow(0,0,CxBarAt-SIZEBAR,rcDlg.bottom-rcStatus.Height());//
// move list file
m_List_File_Info.MoveWindow(CxBarAt,0,rcDlg.right-CxBarAt,rcDlg.bottom - rcStatus.Height());//
}
]
解决方案 »
- MFC怎么能用TextArea
- 为什么在mfc中编译NT服务程序会出现error C2065: 'SC_HANDLE' : undeclared identifier的错误
- 誰遇过这样的问题。把一个继承CWnd的类创建在CDialog中,为什么它接收不了CWnd::OnSetFoucs()和CWnd::KillFocus()消息?
- 怎样在vc中导出Excel表格????
- kao,别人工资都拿双份,我的可用分倒不涨了,大散
- Access数据库的记录数有没有限制?
- 我用htmlview如何才能知道网页已经显示完成了????高分
- 请教个vc2008的问题
- 进程保护
- 在多文档/视图中,在取文档模板中的一个文档时需用到CDocTemplete::docname,请问 此值是在何处注册的?
- 定义一个类出现的问题
- vs2010 启动错误 the operation could not be...
对话框内
上边一排,左边一列,下边一排都有控件,中间有一个tree控件,tree右边有一个list控件,
我是想光标移动到tree和list之间,可以拖动tree和list的宽度,现在一拖动两个控件就把整个对话框都给占了另外怎么插入图片和代码啊
ScreenToClient(...);
m_tree.MoveWindow(...);
另外这是onsize里的代码
if((IsWindow(m_tree.m_hWnd)) && (IsWindow(m_List_File_Info.m_hWnd)) && (IsWindow(m_Pro.m_hWnd)))
{// get sizes; width of tree never changed
CRect rcTree;
m_tree.GetClientRect(&rcTree);
CRect rcEdit;
m_List_File_Info.GetClientRect(&rcEdit);
CRect rcStatus;
m_Pro.GetClientRect(&rcStatus);
//
rcTree.bottom=cy-rcStatus.Height();
m_tree.MoveWindow(&rcTree,TRUE);
//
rcEdit.left=rcTree.right+SIZEBAR;
rcEdit.right=cx;
rcEdit.top=0;
rcEdit.bottom=rcTree.bottom;
m_List_File_Info.MoveWindow(&rcEdit,TRUE);
//
m_Pro.MoveWindow(0,cy-rcStatus.Height(),cx,rcStatus.Height(),TRUE);
}