Click here to Skip to main content
15,915,867 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDisplaying a dialog from a DLL Pin
Squatch618-Mar-03 17:06
Squatch618-Mar-03 17:06 
GeneralRe: Displaying a dialog from a DLL Pin
Abbas_Riazi18-Mar-03 19:08
professionalAbbas_Riazi18-Mar-03 19:08 
The Dll try to load dialog template from your source module (in other hand, your EXE), because of this, it failed to load.
For solving this problem, I always export a function from dll.
e.g.:
extern "C"
__declspec(dllexport) int ShowSomeDialog()
{
    CMyDllDialog dlg;
    return (dlg.DoModal());
}

As you see, in the body of function, I call dialog. The dialog will appear with no problem.
You must call this function, in your main program. The definition of it looks like this:
__declspec(dllimport) int ShowSomeDialog();

Remember that to add Dll library to your project.
It's also possible to call this function explicity!

A. Riazi
GeneralRe: Displaying a dialog from a DLL Pin
Squatch619-Mar-03 9:15
Squatch619-Mar-03 9:15 
GeneralRe: Displaying a dialog from a DLL Pin
Abbas_Riazi19-Mar-03 20:39
professionalAbbas_Riazi19-Mar-03 20:39 
GeneralRe: Displaying a dialog from a DLL Pin
Squatch619-Mar-03 20:50
Squatch619-Mar-03 20:50 
GeneralICON Pin
Anthony988718-Mar-03 16:19
Anthony988718-Mar-03 16:19 
GeneralRe: ICON Pin
Dave Bryant18-Mar-03 16:26
Dave Bryant18-Mar-03 16:26 
GeneralAttention Graphics Programmers. Pin
73Zeppelin18-Mar-03 16:18
73Zeppelin18-Mar-03 16:18 
GeneralQuestions about VS as an IDE Pin
Jack Handy18-Mar-03 12:34
Jack Handy18-Mar-03 12:34 
GeneralRe: Questions about VS as an IDE Pin
73Zeppelin18-Mar-03 16:22
73Zeppelin18-Mar-03 16:22 
GeneralRe: Questions about VS as an IDE Pin
Phil Boyd18-Mar-03 16:31
Phil Boyd18-Mar-03 16:31 
GeneralRe: Questions about VS as an IDE Pin
Johnny ²18-Mar-03 21:53
Johnny ²18-Mar-03 21:53 
GeneralWhy whould this be lost?... Pin
CherezZaboro18-Mar-03 12:29
CherezZaboro18-Mar-03 12:29 
GeneralRe: Why whould this be lost?... Pin
Dave Bryant18-Mar-03 12:44
Dave Bryant18-Mar-03 12:44 
GeneralRe: Why whould this be lost?... Pin
CherezZaboro18-Mar-03 12:56
CherezZaboro18-Mar-03 12:56 
GeneralRe: Why whould this be lost?... Pin
Dave Bryant18-Mar-03 13:00
Dave Bryant18-Mar-03 13:00 
GeneralRe: Why whould this be lost?... Pin
CherezZaboro18-Mar-03 13:11
CherezZaboro18-Mar-03 13:11 
GeneralRe: Why whould this be lost?... Pin
Dave Bryant18-Mar-03 15:03
Dave Bryant18-Mar-03 15:03 
GeneralRe: Why whould this be lost?... Pin
CherezZaboro18-Mar-03 18:23
CherezZaboro18-Mar-03 18:23 
GeneralListView Colors..weird Pin
Bengi18-Mar-03 11:10
Bengi18-Mar-03 11:10 
GeneralRe: ListView Colors..weird Pin
Bengi18-Mar-03 23:18
Bengi18-Mar-03 23:18 
GeneralRe: ListView Colors..weird Pin
Alexinuk18-Mar-03 23:23
Alexinuk18-Mar-03 23:23 
GeneralCButton and DialogBar Pin
MemLeak18-Mar-03 10:48
MemLeak18-Mar-03 10:48 
GeneralRe: CButton and DialogBar Pin
Ravi Bhavnani18-Mar-03 10:54
professionalRavi Bhavnani18-Mar-03 10:54 
GeneralRe: CButton and DialogBar Pin
MemLeak19-Mar-03 7:38
MemLeak19-Mar-03 7:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.