当前位置:编程学习 > C#/ASP.NET >>

error C2660: “GetClientRect”: 函数不接受 1 个参数

程序如下:

void CTaskingDoc::CalcPoint(int iID, CSpinner* pSpin)
{
RECT rWndRect;
CPoint ptPos;
int iLength;
CTaskingView *pWnd;

pWnd = (CTaskingView*)pSpin->GetViewWnd();

pWnd = GetClientRect( &rWndRect);
iLength = rWndRect.right / 6;

switch(iID)
{
case 0:
ptPos.x = (rWndRect.right /4) - iLength;
ptPos.y = (rWndRect.bottom /4) - iLength;
break;
case 1:
ptPos.x = ((rWndRect.right /4)*3) - iLength;
ptPos.y = (rWndRect.bottom /4) - iLength;
break;
case 2:
ptPos.x = (rWndRect.right /4) - iLength;
ptPos.y = ((rWndRect.bottom /4)*3) - (long)(iLength * 1.25);
break;
case 3:
ptPos.x = ((rWndRect.right /4)*3) - iLength;
ptPos.y = ((rWndRect.bottom /4)*3) - (long)(iLength * 1.25);
break;
}
pSpin->SetLength(iLength);
pSpin->SetPoint(ptPos);
}

在VS2010里面生成会出现“函数不接受 1 个参数”错误,怎么办。求大神出现。 --------------------编程问答-------------------- GetClientRect需要参数吗 --------------------编程问答-------------------- 需要的,而且还有两个。 --------------------编程问答-------------------- 需要的,而且还需要两个。。。。。。。。。。 --------------------编程问答-------------------- 是我弄错了,问题解决了。

pWnd = GetClientRect( &rWndRect);

应该是pWnd -> GetClientRect( &rWndRect); --------------------编程问答--------------------
引用 4 楼  的回复:
是我弄错了,问题解决了。

pWnd = GetClientRect( &rWndRect);

应该是pWnd -> GetClientRect( &rWndRect);


GetClientRect( &pWnd ,rWndRect);

pWnd -> GetClientRect( &rWndRect);


应该都行吧
补充:.NET技术 ,  VC.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,