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.

Remarks

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.

See Also

Concepts

DLL Frequently Asked Questions