Results 1 to 4 of 4

Thread: is it possible to remove the title bar of an OpenGL window?

  1. #1
    Guest

    is it possible to remove the title bar of an OpenGL window?

    i find that all the openGL windows created using
    glutCreateWindow(".....")
    has a title bar.

    but i don t want to show the maximizing, minimiziong and close buttons on the title bar. Is it possible to remove that?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Aug 2003
    Posts
    369

    Re: is it possible to remove the title bar of an OpenGL window?

    Well, I don't think you can do that with glut. (Unless you go fullscreen) You'd need windowing system dependent code to do that.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jan 2001
    Location
    Ukraine
    Posts
    101

    Re: is it possible to remove the title bar of an OpenGL window?

    If your target platform is windows you can do the trick with following code snippets used right before glutMainLoop():
    Code :
      	HWND hThisWnd = FindWindow( "GLUT", "your window name" );
    	if( hThisWnd )
    	{
    		LONG lStyle = GetWindowLong( hThisWnd, GWL_STYLE );
    		SetWindowLong( hThisWnd, GWL_STYLE, lStyle & 
    			(~(WS_MAXIMIZEBOX|WS_MINIMIZEBOX|WS_SYSMENU ) ) );
    	}

  4. #4
    Senior Member Regular Contributor
    Join Date
    Aug 2003
    Posts
    369

    Re: is it possible to remove the title bar of an OpenGL window?

    Cool hack!

Similar Threads

  1. texture invalid after remove opengl window
    By ale211734 in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 03-21-2016, 11:02 AM
  2. How to remove title bar in GLUT
    By tencul in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 03-29-2006, 05:42 PM
  3. Creating a window without crl buttons & Title bar
    By BedThife in forum OpenGL: General
    Replies: 1
    Last Post: 06-04-2005, 07:57 PM
  4. Creating a window without crl buttons & Title bar
    By BedThife in forum OpenGL: Windows
    Replies: 0
    Last Post: 05-11-2005, 07:02 AM
  5. GLUT window without title bar
    By yanf in forum OpenGL: General
    Replies: 1
    Last Post: 07-23-2002, 05:53 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