View Full Version : Attaching a glut window to window's window
01-21-2004, 03:12 PM
Is it possible to make glut functions work without a window created by glut itself. Or is there any way I can attach the glut window with a window created by windows application. I am usining Borland C++.
10-05-2005, 11:45 AM
I am having a similar situation with my project. I am using vega prime which runs a console app then initializes a ogl window to draw the scenes. vega prime api does not include a menu or dialog system, so I am looking into using glut glui for creating subwindows inside my vp app. Anyone else have any luck with this? First couple of test allowed me to create a glui main window inside my vega prime code but this window overrides my vega prime ogl window which is not what I want. What I would like is a method of creating a subwindow without creating a main glui window from my ogl vega prime application.
If you understand that bit then,
vp_window = glutGetWindow();
GLUI *glui2 = GLUI_Master.create_glui_subwindow (vp_window, GLUI_SUBWINDOW_RIGHT );
glui2->set_main_gfx_window( vp_window );
This code does not work.
Any help would be appreciated. Thanks
Gizmo of Dewitt
11-17-2005, 01:24 AM
since glut runs in a dll taking ownership of its windows may be difficult
basically make a spy program that lets you see all the window class names that are open, with that information you can get the window handle(hwnd) and use gdi to do whatever you want with it, draw on it, close it etc etc
there is a function that lets you set a windows parent
check out msdn for the hwnd functions specifically the function getwindow, and the setparent functions
but i think being in a dll counts as being a part of your app, since only the app the window belongs to can change the parent
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.