Click here to Skip to main content
13,089,401 members (58,585 online)
Rate this:
Please Sign up or sign in to vote.
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
CMFCToolTipInfo ttParams;
ttParams.m_bVislManagerTheme = TRUE;
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() 
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:
  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 .

Posted 4-Oct-12 2:11am
Updated 4-Oct-12 2:36am
Richard MacCutchan 4-Oct-12 9:26am
From the above it's impossible to guess what may be happening. You need to put some more breakpoints in to see where the crash occurs.
bitsmax 5-Oct-12 1:07am
Hello Richard,
I know it is very much difficult to guess what is happening ,
May be some person who done porting MFC feature pack , can provide me some suggestions, may be they have faced same kind of problems .
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You could try to activate all check boxes in the "VS->Debug->Exceptions" dialog
and then launch the debugger again:

Compare also your sequences with their version generated by VS-Wizard for a sample :)
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I went through a lot of headaches in my first conversion to the Feature Pack.

I ended up just letting the wizard generate a fresh new framework and merging my older code into it.

In my view, it was important to understand why the manual conversion was failing so much as getting the code upgraded quickly, so I could get back to writing code.
bitsmax 5-Oct-12 1:04am
Hello Jack,
For me its not possible to generate a new framework and merge the code , as mine code too complex and large . It will be a great help if you share some suggestions and precautions in porting MFC feature pack.
JackDingler 5-Oct-12 9:11am
I'm gonna call BS on this, as the last projects I did this with were huge, complex had many features that never should've gone into a properly written GUI application.

I don't have your code, nor am I familiar with it, so I can't identify what you're doing that is incompatible with the Feature Pack. In the projects I ported, these things only became obvious during the merge, when my newly merged code quit functioning.

The structure of your project files may have some issues, and your manifests. You might compare those against an MFC Wizard produced project.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 4 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100