Long Over do Explanation!
I know this is an old topic but just in case someone comes upon it by chance I wanted to post a reply so people can see. First of all this isn't good programming practice. Your HWND button shouldn't be in the WinMain function because your Callback can't access it, it must be a global if you wish to use it this way. Also you shouldn't create it in WinMain, you should use the case WM_CREATE to run the function...
Leave a comment: