I have a program with two windows. I open the second window by pressing a button. And close it using the DestroyWindow( ), I also tried PostQuitMessage(WM_QUIT ). Both of these functions result in the program crashing. When I click on the X in the top right of the window or press alt+F4 the window closes perfectly and returns to the first window.
Q. What signal is alt+F4 sending to the window.
p.s I am using VC++