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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Possible errors when using CDialog::Create();

Status
Not open for further replies.

d00ape

Programmer
Apr 2, 2003
171
SE
I’m geting a runtime-error when calling:

m_myDialog.Create( IDD_RECOURCEDIALOG, this );

in my ActiveX Ctrl OnCreate(..)-method

"m_myDialog" is an Dialoge-recource which I have as a private member of my ActiveX-Ctrl-class

Tanks - Anders


APe
 
OnCreate is called just before the control is created

You mustn't pass the "this" pointer to create a child dialog, until the control has been created.

Also I'm not sure about the ramifications of making a dialog a child of a control. Perhaps it isn't right?

I REALLY hope that helps.
Will
 
OK. Thanks

But now I realy myst create mu CDialog as a child of mycontroll. Any suggestion in which function of my control to create it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top