View Full Version : How do I get the handle fo an OpenGL window?
01-28-2007, 04:23 AM
After creating a window via glutCreateWindow(), how can i get the handle of this window?
01-28-2007, 06:30 AM
You can't. There are different window managers (win32, X etc.) around and libraries like GLUT are created to hide that differences. If you work with Windows, you could try to obtain the DC of the current window by using wglGetCurrentDC, but I don't know any win32 function that would retrieve the window handle from a dc... My advice: if you need the window handle, create your window manually.
01-28-2007, 02:48 PM
OK, I will take a try, int fact, I want to retrive the default value of an OpenGL window's position and dimension, so I use the Win32 function GetWindowInfo, but you know the first parameter of this function is the window's handle, so I need it, maybe there is something else can perform this, I don't know.
Thank you !
01-28-2007, 04:46 PM
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.