Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create dialog in DLL from resource?

Status
Not open for further replies.

BeanDog

Programmer
Jul 15, 2000
60
US
I created an MFC-enabled DLL project in MSVC++6.0, added a blank dialog resource with the resource editor, and run the following when the DLL is loaded:

CDialog dlg;
dlg.Create(IDD_DLG);

This fails. It also fails if I use MAKEINTRESOURCE before passing IDD_DLG in. It gives me a failed assertion saying something about a resource handle being NULL. Why can't I do this?



~BenDilts( void );
 
Hi.

Try the followiong:

CDialog* pDlg;
pDlg->Create(IDD_DLG);
pDlg->ShowWindow(SW_SHOW);

For more info read MSDN CDialog.

best regards,
Kirilla
 
As I said in my original post, the problem is not that the window is not visible. I WANT it to be invisible (I just need it to hold an ActiveX control to do invisible work). It gives me an assert error on the Create.



~BenDilts( void );
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top