I dont see Windows Form in there but you should be using MFC application because CButton and Win32 does not go together..