I’ve got one more question.
What style should have a window (derived from CWnd) in which the OpenGL technology is used?
I place this window on a dialog using the standart CWnd::Create() function. So I should pass in the window style as an argument.
I have found some information ragarding to the preferable style. It is worth using WS_CLIPCHILDREN and WS_CLIPSIBLINGS styles plus starndart styles like WS_VISIBLE and WS_CHILD. However using mentioned styles together I met with a problem: sometimes the window stops responding. It occurs when the SetPixelFormat() is invoked. Without WS_CLIPCHILDREN and WS_CLIPSIBLINGS styles it goes fine.
Where is a problem?
Thank you in advance,
You must use WS_CLIPCHILDREN and WS_CLIPSIBLINGS in an OpenGL window. If it is a child window you must use WS_CHILD. I think you need WS_VISIBLE or you wont see the window. If you get problems with SetPixelFormat() it should be something else. Are you using ChoosePixelFormat to make sure your are selecting the right pixel format?
I understand there’s a site dedicated to using OpenGL with MFC ( http://www.mfcogl.com ). This thread also had other links related to using MFC with OpenGL ( http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/008303.html ).
It depends if you are making a SDI or MDI window, If its SDI (one window) then you dont need clipchildren and so on. Also, you should plug in CS_OWNDC for the class style (for Win95/98/Me)