I am getting an exception in MFC LoadFrame from a project that compiled well before

Juan Dent 236 Reputation points
2022-05-18T23:00:32.79+00:00

I have an MFC app in VS 2022 that throws exception when InitInstance calls pMainFrame->LoadFrame(IDR_MAINFRAME)... it used to compile fine until now!! Please help!!

Developer technologies | C++
{count} vote

3 answers

Sort by: Most helpful
  1. Juan Dent 236 Reputation points
    2022-05-19T01:30:35.78+00:00

    The bug disappears by setting to false the following instance variable: m_bLoadWindowPlacement in the application class ctor...

    That's why the first time the app runs fine but stops running after the first run.....

    This is an MFC bug!!!

    2 people found this answer helpful.

  2. rtischer8277 41 Reputation points
    2022-05-25T19:17:02.837+00:00

    I just created an MDI project using VS 2022 Preiview 3.0 and got the same assertion. Not fixed yet I guess. Or the fix got lost in versioning.


  3. rtischer8277 41 Reputation points
    2022-05-25T22:11:55.947+00:00

    Got it. Yes, V1.1 still. So waiting for V2 fix.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.