16,472
社区成员
发帖
与我相关
我的任务
分享
error C2440: “static_cast”: 无法从“UINT (__thiscall CSizingControlBar::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )(CPoint)”
1> 从基类型到派生类型的强制转换需要 dynamic_cast 或 static_cast
[/quote]
从基类指针转换为派生类指针,本来就需要强制转换,VC6不需要转吗?error C2440: “static_cast”: 无法从“UINT (__thiscall CSizingControlBar::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )(CPoint)”
1> 从基类型到派生类型的强制转换需要 dynamic_cast 或 static_cast
if (!CMiniFrameWnd::CreateEx(dwExStyle,
NULL, NULL, dwStyle, rectDefault, pParent))//使用NULL 替换 &afxChNil --注意此处的NULL指示的是第二个
{
m_bInRecalcLayout = FALSE;
return FALSE;
}
error C2440: “static_cast”: 无法从“UINT (__thiscall CSizingControlBar::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )(CPoint)”
1> 从基类型到派生类型的强制转换需要 dynamic_cast 或 static_cast
[/quote]
从基类指针转换为派生类指针,本来就需要强制转换,VC6不需要转吗?[/quote]
代码我放到主贴正文的百度链接中了,你可以下载后在VC6中运行。 我们老师说可以直接编译使用的。
extern AFX_DATA TCHAR afxChNil;