I’ve bought OpenGl 2nd edition. In chapter 17,
the codes were for WIN32 API. I want to shift
to MFC use MFC AppWizard. But I encountered a
problem.
For the belowing codes I didn’t know how to
setup wc.style in MFC
application
int APIENTRY WinMain()
{
…
WNDCLASS wc;
…
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC
…
}
Somebody helps…
This post really has nothing to do with OpenGL, and should have been posted in ‘OpenGL under Windows’
The MFC app Wizard will create a MainFrame class for you (CMainFrame), in there you’ll find this function:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return TRUE;
}
make your changes there.
cheers.