Thursday, April 13, 2006

MFC: Class Wizard Error "Object Required"

I did a couple google searches and found a few people stuck on this one.

In Visual Studio 2003 C++ you start the Class Wizard by doing [Add Class].

PROBLEM:
From a blank project, often the error 'Object Required' comes up. And nothing happens.

SOLUTION:
I did some google searches and found no answers, only people like me with the same question. I eventually found an answer. It gives an error because it requires stdafx.h. Add stdafx.h as a blank file and it should work okay.

This was discovered trying to do the MFC Tutorial Part 5, step 7:

http://www.codersource.net/mfc_tutorial_Part5.html