Some examples show these being handled like this:
Charles Petzold Shows it like this:Code:case WM_CLOSE: DestroyWindow(hWnd); return 0; case WM_DESTROY: PostQuitMessage(WM_QUIT); return 0;
not handling the WM_CLOSE message, only the WM_DESTROY.Code:case WM_DESTROY: PostQuitMessage(0); return 0;
According to "Programming Windows", the WM_CLOSE is passed to the default window procedure,
DefWindowProc, which results in the WM_DESTROY message being sent.
Is there a reason to use the former example?