Z
Danke estartu_de!
Stimmt, hätte ich mal selbst drauf kommen sollen...
if (m_pConfig == NULL)
{
m_pConfig = new CConfig(this); // im Standardkostruktor das =NULL rausgenommen
m_pConfig->Create(IDD_CONFIG, GetDesktopWindow());
...
}
CConfig::CConfig(CWnd* pParent /*=NULL*/)
: CDialog(CConfig::IDD, pParent)
{
m_pParent = pParent; // ist in .h als CWnd* m_pParent deklariert
}
...
void CConfig::OnClose()
{
UINT WM_CONFIG_CLOSED = RegisterWindowMessage("WINDOWCLOSED");
m_pParent->PostMessage(WM_CONFIG_CLOSED,0,0);
}
Weitere Verbesserungen?