CFrameWnd without view?

Started by
-1 comments, last by floatingwoods 15 years, 9 months ago
Hello, I have a framework to display my OpenGL screen that works fine. I derived the class CMainWindow from CFrameWnd. I create the window with following code:

HINSTANCE aa=AfxGetInstanceHandle();
LPCTSTR theClass=AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW|CS_OWNDC|CS_DBLCLKS,0,0,LoadIcon(aa,MAKEINTRESOURCE(IDR_MAINFRAME)));
mainWindow->Create(theClass,"My Application",WS_OVERLAPPEDWINDOW|WS_CLIPCHILDREN|WS_CLIPSIBLINGS);	


Now I tried to add an AVI screen capture class (http://www.codeproject.com/KB/audio-video/avigenerator.aspx) that requires to have access to a CView object. However when I call GetActiveView(), the return value is always NULL. How can I get the associated CView object, or does an associated CView object exist in my case? (I have just one simple rendering window with a toolbar docked at the top, nothing fancy) Actually, all I need for the AVI capture class to work is a BITMAPINFOHEADER structure associated with my OpenGL drawing. Where can I get that one? Thanks for any suggestion/help!

This topic is closed to new replies.

Advertisement