See InvalidateRect, second parameter (lpRect)
http://msdn.microsoft.com/en-us/library/ms534893.aspx
Type: Posts; User: manuell
See InvalidateRect, second parameter (lpRect)
http://msdn.microsoft.com/en-us/library/ms534893.aspx
1) The WM_CREATE message is processed during the CreateWindowEx call. You store the module handle in hInc after that call, thus hInc is 0 when you call LoadBitmap. Add the line
hInc = hInstance;...
http://msdn.microsoft.com/en-us/library/ms534858(VS.85).aspx
I would go for 2 controls at the same place, only one being visible. No drawing, just ShowWindow (but I'm lazy).
Your WinMain function has a hThisInstance parameter, but choosing the same name won't magically update the global variable. You have to choose two different names, and explicitly store the handle in...
I have "successfully" reproduced your problem, and fixed it:
1) change the name of the global HINSTANCE variable. (eg: g_hThisInstance)
2) add g_hThisInstance = hThisInstance; to your WinMain...