1>------ 已启动生成: 项目: carry, 配置: Debug Win32 ------
1>生成启动时间为 2011-5-26 15:32:00。
1>InitializeBuildStatus:
1> 正在对“Debug\carry.unsuccessfulbuild”执行 Touch 任务。
1>ClCompile:
1> 所有输出均为最新。
1> stdafx.cpp
1> carryDlg.cpp
1>d:\my documents\visual studio 2010\projects\carry\carry\carrydlg.cpp(183): error C2679: 二进制“-=”: 没有找到接受“int”类型的右操作数的运算符(或没有可接受的转换)
1> f:\vs2010\vc\atlmfc\include\atltypes.h(273): 可能是“void CRect::operator -=(POINT) throw()”
1> f:\vs2010\vc\atlmfc\include\atltypes.h(274): 或 “void CRect::operator -=(SIZE) throw()”
1> f:\vs2010\vc\atlmfc\include\atltypes.h(275): 或 “void CRect::operator -=(LPCRECT) throw()”
1> 尝试匹配参数列表“(CRect, int)”时============以上是弹出的错误信息==============
void CcarryDlg::ShowHideW(BOOL bShow)
{
CRect m_DlgRectLarge(0,0,0,0);
CRect m_DlgRectsmall(0,0,0,0); GetWindowRect(&m_DlgRectLarge);
m_DlgRectsmall = m_DlgRectLarge;
m_DlgRectsmall -= 220; //就是这里自减出错
GetWindowRect(&m_DlgRectLarge);}我在VS2008的MFC代码里就没出错.不知道哪设置错了.哪位朋友帮帮忙解答下.在此先谢鸟!!!!
1>生成启动时间为 2011-5-26 15:32:00。
1>InitializeBuildStatus:
1> 正在对“Debug\carry.unsuccessfulbuild”执行 Touch 任务。
1>ClCompile:
1> 所有输出均为最新。
1> stdafx.cpp
1> carryDlg.cpp
1>d:\my documents\visual studio 2010\projects\carry\carry\carrydlg.cpp(183): error C2679: 二进制“-=”: 没有找到接受“int”类型的右操作数的运算符(或没有可接受的转换)
1> f:\vs2010\vc\atlmfc\include\atltypes.h(273): 可能是“void CRect::operator -=(POINT) throw()”
1> f:\vs2010\vc\atlmfc\include\atltypes.h(274): 或 “void CRect::operator -=(SIZE) throw()”
1> f:\vs2010\vc\atlmfc\include\atltypes.h(275): 或 “void CRect::operator -=(LPCRECT) throw()”
1> 尝试匹配参数列表“(CRect, int)”时============以上是弹出的错误信息==============
void CcarryDlg::ShowHideW(BOOL bShow)
{
CRect m_DlgRectLarge(0,0,0,0);
CRect m_DlgRectsmall(0,0,0,0); GetWindowRect(&m_DlgRectLarge);
m_DlgRectsmall = m_DlgRectLarge;
m_DlgRectsmall -= 220; //就是这里自减出错
GetWindowRect(&m_DlgRectLarge);}我在VS2008的MFC代码里就没出错.不知道哪设置错了.哪位朋友帮帮忙解答下.在此先谢鸟!!!!
POINT point
) throw( );
void operator -=(
SIZE size
) throw( );
void operator -=(
LPCRECT lpRect
) throw( );
CRect类重载的 -= 操作符C/C++ codevoid operator -=(
POINT point
) throw( );
void operator -=(
SIZE size
) throw( );
void operator -=(
LPCRECT lpRect
) throw( );这几个地方需要重写吗?
m_DlgRectsmall -= 220; //就是这里自减出错
--》
m_DlgRectsmall -= CSize(220, 0);
但是不能用"-="是不是
void operator -=(
POINT point
) throw( );
void operator -=(
SIZE size
) throw( );
void operator -=(
LPCRECT lpRect
) throw( );
这里出了问题?