程序异常,求改正
程序错误,求改正
CRect rect;
CWnd *pWnd;
pWnd->GetClientRect(&rect);
GetDlgItem(IDC_EDIT1)->MoveWindow(rect.left, rect.right, rect.Width, rect.Height, TRUE);
程序错误:CWnd::MoveWindow(int,int,int,int,int)' : cannot convert parameter 3 from 'int (void) const' to 'int'
程序目的是想把编辑框的大小设置和view客户区的大小一致,应该怎么改,谢谢!
------解决方案--------------------
我感觉MoveWindow(rect.left, rect.right, rect.Width, rect.Height, TRUE)可能有一些问题
报错原因是CRect结构体函数没写对,应该是rect.Width(),rect.Height()
而且我觉得前两个参数也有问题,应该是左上角的坐标吧,也就是rect.left, rect.top
应该再看看CRect的参数含义。
CRect rect;
CWnd *pWnd;
pWnd->GetClientRect(&rect);
GetDlgItem(IDC_EDIT1)->MoveWindow(rect.left, rect.right, rect.Width, rect.Height, TRUE);
程序错误:CWnd::MoveWindow(int,int,int,int,int)' : cannot convert parameter 3 from 'int (void) const' to 'int'
程序目的是想把编辑框的大小设置和view客户区的大小一致,应该怎么改,谢谢!
------解决方案--------------------
我感觉MoveWindow(rect.left, rect.right, rect.Width, rect.Height, TRUE)可能有一些问题
报错原因是CRect结构体函数没写对,应该是rect.Width(),rect.Height()
而且我觉得前两个参数也有问题,应该是左上角的坐标吧,也就是rect.left, rect.top
应该再看看CRect的参数含义。