Что то неработает ваш примерчик! Вот сами посмотрите что получается в окне Output
Compiling...
C:\*.cpp(191) : error C2440: '=' : cannot convert from 'class CWnd *' to 'struct HWND__ *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\*.cpp(195) : error C2660: 'ShowWindow' : function does not take 2 parameters
C:\*.cpp(201) : error C2660: 'ShowWindow' : function does not take 2 parameters
Error executing cl.exe.