OnDrawItem()
How do you use OpenGL in an owner draw control?
Looking for an example that uses MFC's OnDrawItem() or Win32's WM_DRAWITEM and
OpenGL.
quick google resulted in this
hth
Quote:
11. Adapt OnDraw:
// Useful in multidoc templates
HWND hWnd = GetSafeHwnd();
HDC hDC = ::GetDC(hWnd);
wglMakeCurrent(hDC,m_hglrc);
DrawGLScene(); // do all OpenGL drawing here
SwapBuffers(m_hgldc);
hth
I think that is referring to MFC's CView function OnDraw(), which is different.
Usually, you only have to setup OpenGL once for it.
OnDrawItem() refers to an owner drawn control item, like in a dialog window.
I would like to know the proper way to setup OpenGL for it, render something simple,
then shut it down.
Usually, you only have to setup OpenGL once for it.
OnDrawItem() refers to an owner drawn control item, like in a dialog window.
I would like to know the proper way to setup OpenGL for it, render something simple,
then shut it down.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement