Advertisement

OpenGL Game Programming

Started by February 11, 2003 01:35 AM
1 comment, last by Luya 22 years ago
I got this book as present for my birthday(Feb. 9). While compiling the application for window, I have an error with CreateWindowEx() using Dev-C++. It display a warning like "converting NULL to non-pointer". Here the function:
  
 // Class registered, so now create your window

    hwnd = CreateWindowEx(NULL,                // Extended style

                          "My Class",          // Class name

                          "A real Windows application", // App name

                          WS_OVERLAPPEDWINDOW |   // Window stle

                          WS_VISIBLE | WS_SYSMENU |
                          WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
                          100, 100,               // x,y coordinate

                          1024, 768,              // Width and height

                          NULL,                   // Handle to parent

                          NULL,                   // handle to menu

                          hInstance,
                          NULL);
  
It works fine when I use CreateWindow. What is the problem?
Replace NULL with WS_EX_APPWINDOW or any other flag you might want.


  CreateWindowEx(WS_EX_APPWINDOW, "OpenGL", "Title", WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 0, 0, 800, 600, NULL, NULL, hInstance, NULL);  
Advertisement
And by the way, Happy belated birthday.



DracosX:

Master of the General Protection Fault
DracosX:Master of the General Protection Fault

This topic is closed to new replies.

Advertisement