I have an embedded CMFCListCtrl in report mode inside a CFormView derived class. The View also has an embedded toolbar. One of the buttons calls the CDHTMLDialog.
Everything works fine up to that point. The Dialog opens. Here is the problem:
If I open the CDHTMLDialog and close the app: No errors.
If I first populate the CMFCListCtrl. Call the CDHTMLDialog and close the app. I First get an access violation and a break point on AfxDeactivateActCtx with the following errors:
First-chance exception at 0x78b64f64 (mfc90ud.dll) in PManager.exe: 0xC0000005: Access violation reading location 0x00000000075f3d70. First-chance exception at 0x771eb3dc in PManager.exe: 0xC015000F: The activation context being deactivated is not the most recently activated one. First-chance exception at 0x771eb3dc in PManager.exe: 0xC015000F: The activation context being deactivated is not the most recently activated one. First-chance exception at 0x771eb3dc in PManager.exe: 0xC015000F: The activation context being deactivated is not the most recently activated one. First-chance exception at 0x771eb3dc in PManager.exe: 0xC015000F: The activation context being deactivated is not the most recently activated one. Unhandled exception at 0x771eb3dc in PManager.exe: 0xC015000F: The activation context being deactivated is not the most recently activated one.
I have tried literally everything and have not found a solution.