How to resolve debug assertion error when calling dialog create function in mfc extension dll

채문석(jim) 41 Reputation points
2024-05-23T06:32:49.1433333+00:00

I have code like below:

User's image

User's image

m_pPreviewDlg.Create(IDD_DIALOG_PREVIEW); The error below occurs in this code.

User's image

What is the solution?

I am using visual studio 2022

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,764 questions
{count} votes

Accepted answer
  1. RLWA32 45,701 Reputation points
    2024-05-27T02:05:55.25+00:00

    You cannot use an MFC Extension DLL in your solution from a Windows Forms Application. From MFC extension DLLs: Overview -- "Only MFC executables (either applications or regular MFC DLLs) that are built with the shared version of MFC can use an MFC extension DLL."

    Use a regular MFC DLL instead.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.