In my demo kinda app
case WM_CLOSE:
DestroyWindow(hndl);
return 0;
and
case WM_CLOSE:
PostQuitMessage(0);
r
PostQuitMessage doesn't necessarily mean the end of application. It simply posts WM_QUIT to the message loop and allows you to exit from the message loop, so in most cases, this means the end of the application. However, in a multithread application, if you have the message loop for each thread created, PostQuitMessage only closes that thread.
As a side note, if you ever need more lines of code to execute after the message loop (such as further clean-up), PostQuitMessage is a better way to go, because DestroyWindow destroys the window without going through the message loop, ignoring whatever clean-up codes remaining after the message loop. Some may call it a not-so-good coding practice, but sometimes you can't avoid situations like that.