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

OnParentNotify()

Status
Not open for further replies.

nbgoku

Programmer
May 25, 2004
108
US
ok i have a OnParentNotify(), and i want to detect when a child window is destroyed, what am i forgeting that will notify me that my window is closing
Code:
void CMDAPETDlg::OnParentNotify(UINT temp,LPARAM temp1)
{
	CDialog::OnParentNotify(temp,temp1);
        if(temp == WM_DESTROY)
	{
		MessageBox("child window is now closing");
	}
}
 
Hi. I don't know how to use 'OnParentNotify()' but you can create your own class by deriving from CTreCtrl, CEdixBox, etc. and redefine the virtual function 'OnDestroy()'.

William GS.
 
OnDestroy() for the parent window or child window?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top