Quote Originally Posted by NirDemchog View Post
I am just thinking maybe the handle "hMyWnd" is not declared as it should have been.
Your thinking goes in right direction. There's one funny thing about uninitialized global variable: no matter what section it was put in with pragma, once it found uninitialized it goes into .bss section.