OpenGL _above_ a win32 control?
Hiyall,
The controls (like a toolbar or in this case: a window with a border) are above the part where I draw my OpenGL scene. But I want the OpenGL scene to be IN the little control window...between the borders. But I didn't saw anything I could change to do this.
How?
Thanks anyways,
Decrius
I think you mean you want a sub region of the window to contain your OpenGL rendering context. You would have to create a panel within the form then pass the handle of that panel when creating the rendering context.
Yes, I have a few controls, and I would like to display the opengl _only_ _in_ the control. Sample code for a simple control:
HWND CreateCustomControl(HWND hwndParent)
{
HWND hwndCtrl;
hwndCtrl = CreateWindowEx(
WS_EX_CLIENTEDGE, // give it a standard border
szClassName,
_T("A custom control"),
WS_VISIBLE | WS_CHILD,
0, 0, 100, 100,
hwndParent,
NULL, GetModuleHandle(0), NULL
);
return hwndCtrl;
}
That is win32 programming in C, but maybe I have to use the hwndCtrl as handle for OpenGL? Just a guess...
Thanks anyways :)
Decrius
HWND CreateCustomControl(HWND hwndParent)
{
HWND hwndCtrl;
hwndCtrl = CreateWindowEx(
WS_EX_CLIENTEDGE, // give it a standard border
szClassName,
_T("A custom control"),
WS_VISIBLE | WS_CHILD,
0, 0, 100, 100,
hwndParent,
NULL, GetModuleHandle(0), NULL
);
return hwndCtrl;
}
That is win32 programming in C, but maybe I have to use the hwndCtrl as handle for OpenGL? Just a guess...
Thanks anyways :)
Decrius
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement