Results 1 to 5 of 5

Thread: Hiding the COMMAND PROMPT window behind my OpenGL app

  1. #1
    Junior Member Newbie
    Join Date
    May 2006
    Location
    Oklahoma
    Posts
    2

    Hiding the COMMAND PROMPT window behind my OpenGL app

    I am just beginning to play with OpenGL. I have made an application that works well. There is a command prompt looking window that shows up behind my application. I need this window to not be there. How can I get rid of it? The window has the heading of the path of my exe.

    Thanks in advance...

    NewB

  2. #2
    Senior Member Regular Contributor songho's Avatar
    Join Date
    May 2003
    Location
    Canada
    Posts
    242

    Re: Hiding the COMMAND PROMPT window behind my OpenGL app

    Chad W,
    I can imagine you are using MS Windows platform. You have to make it as Windows GUI application, not console. It is a compiler specific setting, and no relation with OpenGL.

    Please check your compiler manual, and you will have better chance to get the right answer from compiler specific forums or usergroups.

  3. #3
    Junior Member Newbie
    Join Date
    May 2006
    Location
    Oklahoma
    Posts
    2

    Re: Hiding the COMMAND PROMPT window behind my OpenGL app

    Thank you, however my ignorance continues. I changed the project type from console to just an empty WIN32 and the app crashes before even bringing up the openGL window. it crashes at-

    void OGAPIENTRY glutKeyboardFunc(
    void( * callback )( unsigned char key, int x, int y )
    )
    {
    if( !ogStructure.Window->IsClientMenu )
    SET_CALLBACK( Keyboard );
    }

    I looked through all the project types under C++, and nothing really jumped out at me. I am using VS2005.

  4. #4
    Senior Member Regular Contributor songho's Avatar
    Join Date
    May 2003
    Location
    Canada
    Posts
    242

    Re: Hiding the COMMAND PROMPT window behind my OpenGL app

    I think you posted the glut source code, and it should not crash at this point.

    Please post your code again where you register keyboard callback function and actual implementation of your callback routine.

  5. #5
    Guest

    Re: Hiding the COMMAND PROMPT window behind my OpenGL app

    If your project is a console app using GLUT in Visual Studio, you can add the following line to your source file to prevent the extra console popup

    Code :
    #pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")

Similar Threads

  1. Problem in window showing and hiding
    By Sasi_Opengl in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 09-16-2013, 12:57 AM
  2. Prompt in OpenGL
    By wasife in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-21-2005, 04:55 AM
  3. Replies: 7
    Last Post: 11-15-2003, 07:52 PM
  4. Enter Command from prompt.
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-10-2001, 06:31 AM
  5. Hiding The Console Window
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-29-2001, 01:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean