CWnd *pWnd;
pWnd = (CWnd *)GetDlgItem(IDC_EDIT);
if(pWnd )
{
CRect rect;
CRect WindowRect;
pWnd->GetWindowRect(rect);
GetClientRect(WindowRect);
ScreenToClient(rect);
rect.right = WindowRect.Width() * 80 / 320 + rect.left;
rect.bottom = WindowRect.Height() * 20 / 200 + rect.top;
pWnd->MoveWindow(rect);
}
pWnd = (CWnd *)GetDlgItem(IDC_EDIT);
if(pWnd )
{
CRect rect;
CRect WindowRect;
pWnd->GetWindowRect(rect);
GetClientRect(WindowRect);
ScreenToClient(rect);
rect.right = WindowRect.Width() * 80 / 320 + rect.left;
rect.bottom = WindowRect.Height() * 20 / 200 + rect.top;
pWnd->MoveWindow(rect);
}
CRect rect;
GetClientRect(&rect);
CRect rc = CRect(0,0,rect.Width, rect.Height);
CTreeCtrl* pTree = 你的树型控件;
pTree->MoveWindow(rc);
CTreeCtrl* pTree = 你的树型控件;这段代码等号右边我应该写什么,是空间的ID吗?
CTreeCtrl* pTree = IDC_TREE;
错误提示
error C2440: 'initializing' : cannot convert from 'const int' to 'class CTreeCtrl *'