First, it's not an error, it's a warning. Take a closer look at the message; it says [Warning].

Second, what it's complaining about is that you're passing NULL when the actual parameter is not a pointer type. First parameter of CreateWindowEx is a bit mask (an integer), not a pointer.

Altough, in C++, NULL is defined as 0, which is a perfectly valid integer value, there is an important conceptual difference between actually typing 0 and NULL. NULL indicates a pointer type, but the parameter isn't a pointer type. I would guess the compiler is issuing a warning because of this to tell you that you're using NULL for the wrong purpose. If you intend to use the integer value zero, then type 0.

Omaha

11-06-2005, 10:25 PM

He may have "treat warnings as errors" or something like that enabled. However, as stated, yes, the compiler appears to not like that a a symbol defined as a pointer is being passed in a place where an actual numeric value is desired.