Article ID: 121947
Article Last Modified on 11/21/2006
export "C"
{
void FAR PASCAL _export CreateModal(HWND hParent);
}
\* kbon
/* Compile options needed: standard USRDLL options
*/
void FAR PASCAL _export CreateModal(HWND hParent)
{
TRACE("Inside USRDLL\n");
CWnd wndParent;
if (!wndParent.Attach(hParent) )
{
TRACE("Attach Failed\n");
AfxAbort();
}
CMyDialog Dlg(IDD_DIALOG1, &wndParent); // IDD_DIALOG1 is in
// the DLL resource
if ( Dlg.DoModal() == IDOK )
{
// more code
}
else
{
// check for cancel or error
}
wndParent.Detach(hwndParent);
}
\* kboff
Note: In Visual C++ version 4.0, the term "USRDLL" is obsolete. In
earlier versions, USRDLL described DLLs that used MFC internally,
but typically export functions using the standard "C" interface.
In version 4.0, such DLLs are called "Regular DLLs." Regular DLLs,
statically linked to MFC have the same characteristics as the
former USRDLL.
Additional query words: kbinf modal dialog CDialog DLL USRDLL 1.50 2.00 2.50 2.51 3.00 4.00 S_MFC
Keywords: kbcode KB121947