BOOL CMainWindow::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle , const RECT& rect , CWnd* pParentWnd , LPCTSTR lpszMenuName , DWORD dwExStyle , CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
m_pTriangle = NULL;
m_pEditYellow = NULL;
m_clrText = RGB( 0, 0, 0 );
m_clrBkgnd = RGB( 255, 255, 0 );
m_brBkgnd.CreateSolidBrush( m_clrBkgnd ); return CFrameWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, MAKEINTRESOURCE(IDR_MENU1), dwExStyle, pContext);
}
TestMFC.exe 中的 0x7838a320 (mfc80ud.dll) 处最可能的异常: 0xC0000005: 读取位置 0xfeeeff4a 时发生访问冲突
TestMFC.exe 中的 0x7838a320 (mfc80ud.dll) 处未处理的异常: 0xC0000005: 读取位置 0xfeeeff4a 时发生访问冲突请高手帮忙!
{
// TODO: Add your specialized code here and/or call the base class
m_pTriangle = NULL;
m_pEditYellow = NULL;
m_clrText = RGB( 0, 0, 0 );
m_clrBkgnd = RGB( 255, 255, 0 );
m_brBkgnd.CreateSolidBrush( m_clrBkgnd ); return CFrameWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, MAKEINTRESOURCE(IDR_MENU1), dwExStyle, pContext);
}
TestMFC.exe 中的 0x7838a320 (mfc80ud.dll) 处最可能的异常: 0xC0000005: 读取位置 0xfeeeff4a 时发生访问冲突
TestMFC.exe 中的 0x7838a320 (mfc80ud.dll) 处未处理的异常: 0xC0000005: 读取位置 0xfeeeff4a 时发生访问冲突请高手帮忙!
解决方案 »
- 工具栏上按钮图标时隐时现
- 如此使用LoadImage为什么在DLL中返回值是NULL??????????????????????????????????????????????????急!!!!!!!!!!!!!!!!!
- 跪求《Visual C++ 技术内幕》(第四版)!
- COM组件命名规范(急求)
- 我的程序莫名其妙最小化了,帮我分析下
- ADO中Connection对象的open有密码的ACCESS数据库,用户名是什么?
- 关于用对话框调用DLL的问题
- 哪儿有简体的《深入浅出MFC》下载
- 十一连环问(都是初学者问题,辛苦了)
- 哪位知道,如何判断一个文件是Office文档?
- 请问如何屏蔽对话框标题栏的右键菜单
- 请教高手,在线等,关于VC获取word文档页眉时引起的一个现象
按“重试”调试一下就知道了。不过从你的代码看,多半是“m_brBkgnd”这个变量出了问题。尝试把其移到调用基类的Create方法后面去:BOOL bRet = CFrameWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, MAKEINTRESOURCE(IDR_MENU1), dwExStyle, pContext); if( bRet )
{
if( m_brBkgnd ) ::DeleteObject(m_brBkgnd);
m_brBkgnd.CreateSolidBrush( m_clrBkgnd );
}return bRet;
{
Create (NULL, _T ("The Hello Application"));
m_editY.Create(WS_VISIBLE | WS_CHILD | WS_BORDER,CRect(500, 10, 550, 60),this, ID_YELLOW_EDIT2);
//提示:
//TestMFC.exe 中的 0x7838a320 (mfc80ud.dll) 处未处理的异常: 0xC0000005: 读取位置 0xfeeeff4a 时发生访问冲突
}m_editY是我自已写的类CYellowEdit的定义的对象
这样肯定出错!!
你想想,东西都没有构造完成,能create什么出来?