Hi!
I need to close one window from the other (parent). This which I need to close I create when click on a button in parent window.
So I think trick with constructor is not the best.
The parent should have a pointer to the child window or a copy of its HWND at least. Just post a message to tell the child to close (WM_CLOSE should be sufficient although you might need to handle the message differently from normal if you need to clean stuff up when the window is closed).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.