Click here to Skip to main content
15,897,273 members

Porting to MFC feature pack leads crash to existing aplication

bitsmax asked:

Open original thread
Hello all,
I started porting to MFC feature pack to my exiting application to get better UI support. I made following changes .

Modify the base class.
CWinApp to CWinAppEx
CMDIFrameWnd to CMDIFrameWndEx
CMDIChildWnd to CMDIChildWndEx


Added following line of code in InitInstance
InitContextMenuManager();
InitShellManager();
InitKeyboardManager();
InitTooltipManager();
CMFCToolTipInfo ttParams;
ttParams.m_bVislManagerTheme = TRUE;
theApp.GetTooltipManager()->
SetTooltipParams(AFX_TOOLTIP_TYPE_ALL,
RUNTIME_CLASS(CMFCToolTipCtrl), &ttParams);


code build successfully, but while launching the application i am getting crash just after login dialog apperes. while debugging i found OnInitDialog works fine. But after the oninitdialog returns , it gave exception .i dont know where exactly the crash happens .
LoginDlg oDlg(strUserName, bstrLanguage,bstrDomainName);
	
if(oDlg.DoModal() == IDOK)
{.....}

//OnInitDialog Code 
BOOL LoginDlg::OnInitDialog() 
{
CDialog::OnInitDialog();

CoTranslateWindow(GetSafeHwnd()); 

.........

return true ;
}

i am getting exception like
Unhandled exception at 0x7787703d in MyApp.exe: 0xC0000005: Access violation writing location 0x0000000000030ff8.


Problem Event Name:	APPCRASH
  Application Name:	MyApp.exe
  Application Version:	5.23.0.0
  Application Timestamp:	506d7f93
  Fault Module Name:	mfc90u.dll
  Fault Module Version:	9.0.30729.4967
  Fault Module Timestamp:	4b6bc34c


I know it is very abstract, but please help me .

Regards
BitsMax
Tags: C++, Visual Studio (Visual Studio 2008), MFC

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900