before the createdialog funct put this code & give a try ,
AFX_MANAGE_STATE(AfxGetSta
Since the resource for dlg is at dll we should do the above.otherwise the resource is loaded from the exe .
Main Topics
Browse All TopicsI try to display a dialog box from a DLL
but when i call the dll function to call
the dialog box i see just the buttons and no Frame and just a black background but the mesaage transfer between dialog and callback function is correct what is the problem.
Cdlg = CreateDialog (g_hInst,(LPCSTR) MAKEINTRESOURCE (IDD_AGENTDIALOG),
(HWND) NULL,(DLGPROC) CallDlg);
ShowWindow (Cdlg,SW_SHOW);
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
eek I think that you are doing this the HARD way. Let me first try to get this straight. You have a dll with a dialog in it that you want to display in your app? Well thats easy. Look at it this way that dialog that is in the dll is part of the app IF you link the dll's LIB file the your app. then where ever you want to display the dialog from include the dialogs header file to the source and call the dialog just as if it were part of the app already.
MyDialog dlg;
dlg.DoModal();
Also there is one change that you have to make to the dialogs header file in the dll. Below is the header file for a dialog in a dll that I made.
class AFX_EXT_CLASS CAnalogInputDefPropPage : public CPropertyPage
Can you see the difference? Its that AFX_EXT_CLASS thing. I cannot remember exactly what it does but it allows you to export and import functions. I think. You will have to use MSDN to verify that. I can send you a dummy app that uses a dialog from a dll to show you it works. just add your email.
Business Accounts
Answer for Membership
by: MichaelSPosted on 2000-07-27 at 08:23:38ID: 3618175
can you show your CallDlg function?