Hi all, i'm a newbie. I'm have a question that i don't quite get after reading those online win32 api beginner tutorials.
When we click on the "X" on the upper right of a (CreateWindowEx) window, is the WM_DESTROY message sent before the window is destroyed?
Is the WM_DESTROY message sent for all types of window created with CreateWindow/CreateWindowEx?
I'm asking cause i'm confused with the behaviour/procedure associated with the "X" control on a normal window (created with CreateWindowEx) and the "X" control on a dialog window (created with the DialogBox macro).
Clicking on the "X" on a normal window terminates the window, but clicking on the "X" on a dialog box does nothing. I already put the EndDialog(hwnd, NULL) under switch case WM_DESTROY for the dialog box's procedure but it doesn't work. The EndDialog(hwnd, NULL) works fine when i use it under the switch case WM_COMMAND for an "OK" control.
I'm really confused. Anyone please help me out with my stupid question.