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

does modeless dialog need a "delete"

Status
Not open for further replies.

koeicjm

Programmer
Sep 12, 2001
73
0
0
JP
does modeless dialog need a "delete", or is the "destroywindow" enough for it? if the delete is need,when do it?
 
"destroywindow" will not remove the Object.
best way to use "delete" is in the destructor of the object
that created the modeless dialog.
 
Typically when you do a modeless dialog, you put a Create() function in the dialog class constructor and a DestroyWindow() function in the destructor.

If you then declare your dialog like this:

CMyDialog *pDlg = new CMyDialog(this);

Then you need to clean up later with a

delete pDlg;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top