Hi,
I create a child window using the following statements:
m_dChildDlg.Create(IDD_DIALOG_CHILD,this);
m_dChildDlg.ShowWindow(SW_SHOW);
Now I can find handle of the window and close it by using FindWindow command with the following entry:
CWnd* pWnd = CWnd::FindWindow(NULL,"Dialog"
;
if(pWnd)
{
pWnd->DestroyWindow();
}
But when I change the window to a child style with no border, since the title is not visible, I cannot use this.
The first parameter is the Class name, but how can I use it? Can anybody post a small code? (The class name of the dialog is CChildWin.)
I create a child window using the following statements:
m_dChildDlg.Create(IDD_DIALOG_CHILD,this);
m_dChildDlg.ShowWindow(SW_SHOW);
Now I can find handle of the window and close it by using FindWindow command with the following entry:
CWnd* pWnd = CWnd::FindWindow(NULL,"Dialog"
if(pWnd)
{
pWnd->DestroyWindow();
}
But when I change the window to a child style with no border, since the title is not visible, I cannot use this.
The first parameter is the Class name, but how can I use it? Can anybody post a small code? (The class name of the dialog is CChildWin.)