NeHe base code error

When I try to compile the NeHe base code for window creation I get the following error:

The line of code:
wc.lpfnWndProc = (WNDPROC) WndProc;

The error:
‘type cast’ : cannot convert from ‘’ to ‘long (stdcall *)(struct HWND *,unsigned int,unsigned int,long)’

None of the functions with this name in scope match the target type

Could someone please help?

You sure that is the line with the error?

That looks OK.
What compiler you using?

I am using VC++ 6.0 with SP2. It used to work. I didn’t change anything really essential. I just added some drawing stuff to the DrawGLScene() function and it quit working.

Does anybody know what my problem is?

Well, from the looks of your error message WNDPROC is undefined. Have you tried doing Build->Clean and then remaking everything? The only reason why I can think that WNDPROC would be undefined would be if Windows.h wasnt included (unlikely or you’d get alot more errors) or if you using precompiled headers and things got wacky.
Assuming that remaking everything doesnt work, what happens if you remove all the code you added? (just ‘#if 0’ it out). If that solves the compilation problem and you cant find anything wrong with your code, post the changes.

This may be too obvious to be the problem, but did you name your WindowProc function WndProc?

Yes, I named my function WndProc just like NeHe had it in Tutorial #1.