Convert console to MFC

Hi! I have a simple VC++ 6.0 console application with an opengl setting and Cg vertex and fragment shaer.

This time I would like to create a MFC application that uses an opengl and cg vertex shader and fragment shader. But I don’t know how to start. Is there any good examples to follow.

Thanks in advance!

There is not much to learn, you create an MFC application with the wizard and use the different event handlers the same was as you do in a non MFC app, OnCreate, OnSize, OnPaint and so on.

The HDC and HWND variables are just hidden inside the CPaintDC and CWnd classes.

If you know how to use the ordinary GDI functions you should not havce any problems.

Mikael

MFC should only be used for creating tools applications like this:

http://www.gamedev.net/reference/programming/features/3dmfc/

You can also use it for simple windows, but the additional overhead of MFC libraries buys you nothing in that case.

If you just need an ordinary window, then Win32 API is the way to go. You can find examples on NeHe tutorial site:

http://nehe.gamedev.net/

Really thanks!