reduce new/delete operators in window's callback procedure
add errorchecks at calling WIN32APIs
add _DEBUG / NDEBUG macro
check ConsoleScreenBufferInfo is not changed