From: Massimo Soricetti on
Hello,

I have created a new application with MFC wizard, taking all the panes
(build view, class view, tree view etc.) since I want to create a
minimal 3D CAD application. Maybe someday will be not-so minimal.

However I do not know OpenGL yet and very little of MFC, so I'm learning
them all along the path. I'm using the He-Ne tutorials, and I'm trying
to implement them in my application but there are 2 problems (for now):
1) MFC require a WS_CHILD style for the view window since there is an
ASSERT(style = WS_CHILD) in the MFC class files, but OpenGL requires a
different style. So I have troubles in the debug build and a buffer
overflow (???) in the release build.
2) When registering a new window class with a WNDCLASS structure I need
a pointer to the window procedure: I tried to pass &(this->WndProc) but
(obviously enough) it's wrong. Where do I get the pointer I need?

Thanks...

P.S. I searched the internet but found only very simple examples... any
link to a good MFC+OpenGL docs is more than welcome :-)
From: Cathy L. on
hello
even if there are excellent people here, I think you could have better
(and faster) answer on comp.graphics.api.opengl
cathy l.

Massimo Soricetti a �crit :
> Hello,
>
> I have created a new application with MFC wizard, taking all the panes
> (build view, class view, tree view etc.) since I want to create a
> minimal 3D CAD application. Maybe someday will be not-so minimal.
>
> However I do not know OpenGL yet and very little of MFC, so I'm learning
> them all along the path. I'm using the He-Ne tutorials, and I'm trying
> to implement them in my application but there are 2 problems (for now):
> 1) MFC require a WS_CHILD style for the view window since there is an
> ASSERT(style = WS_CHILD) in the MFC class files, but OpenGL requires a
> different style. So I have troubles in the debug build and a buffer
> overflow (???) in the release build.
> 2) When registering a new window class with a WNDCLASS structure I need
> a pointer to the window procedure: I tried to pass &(this->WndProc) but
> (obviously enough) it's wrong. Where do I get the pointer I need?
>
> Thanks...
>
> P.S. I searched the internet but found only very simple examples... any
> link to a good MFC+OpenGL docs is more than welcome :-)