Compiler Error

Started by
1 comment, last by Chimaera 22 years, 5 months ago
Here''s the code (Just trying to make a window and print text):
  
if (!(hwnd = CreateWindowEx(NULL,
                            "WINDOW",
                            "Basic Window",
                            WS_OVERLAPPED | WS_VISIBLE,
                            0,0,
                            400,400,
                            NULL,
                            NULL,
                            hinstance,
                            NULL)))
  
Here''s the error: "90 warning: converting NULL to non-pointer type". Line 90 would be the last parameter in CreateWindowEx.. the NULL))) part. Not sure what this means, if you know, please tell me. If you think it has to do with the rest of the code, make me aware and i''ll put the rest up. Obviously I''m not that great at windows yet, so be nice // chimaera
Advertisement
That''s a warning, not an error. A warning is the compiler (as you would guess) warning you about something you may have meant not to do. If that is the only problem, and it still compiles, no worries.

[Resist Windows XP''s Invasive Production Activation Technology!]
That''s because you''re passing a NULL to the first argument of CreateWindowEx, which expects and integer.

You might want to replace that NULL with WS_EX_CLIENTEDGE, or 0 (if you don''t wan''t any extended styles).
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.

This topic is closed to new replies.

Advertisement