This documentation is archived and is not being maintained.

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 on 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.

Note that 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

DLL Frequently Asked Questions