OpenGL _above_ a win32 control?

Started by
2 comments, last by Decrius 17 years, 12 months ago
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
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora
Advertisement
you mean you want it too be fullscreen?
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.
Reject the basic asumption of civialisation especially the importance of material possessions
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
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora

This topic is closed to new replies.

Advertisement