looks like at a minimum, WM_DESTROY should be handled: close_myapp() PostQuitMessage() Exit()
i had it turned off, and the process would not terminate from the taskbar when its window was destroyed.
Turning it on and just calling PostQuitMessage() only unhooks the winproc, its doesnt exit.
close_myapp() is the "right" way to do it, but may be overkill, as you're terminating anyway, and windows ought to release all resources associated with the process. but its still probably safer to not rely on windows to do your cleaning up for you. in my book (my way of doing things) i'd probably have to call "not calling close_myapp()" a bad practice.
other than WM_DESTROY, i only trap mouse movement, buttons, and wheel. default winproc does all the rest. i wonder what happens when the PC goes to sleep when the game is running? never tried it. it handles lost device now, so it ought to come right back up when you wake up the PC, assuming it (windows) does a full save and restore of state on sleeping.