Export (0) Print
Expand All

How do I create a modal dialog box from within a regular DLL?

When creating a modal dialog box from within a regular DLL statically linked to the MFC, you must pass a valid parent window object to the CDialog constructor. For more information about creating a modal dialog box in a regular DLL that statically links to MFC, see the Knowledge Base article, "How to Create a Modal Dialog from Within a USRDLL" (Q121947). For sample code that creates a modal dialog box, see the sample DLLScreenCap.

The term USRDLL is no longer used in the Visual C++ documentation. A regular DLL that is statically linked to MFC has the same characteristics as the former USRDLL. The advice in the Knowledge Base article also applies to regular DLLs that are dynamically linked to MFC.

Community Additions

© 2014 Microsoft