Please Help!!! CWnd::Create()
I'm using a CWnd-derived class for the first time, I'va always worked with CFrameWnd-Derived classes... I'm getting an Access Violation error with the following code:
Create(NULL,"Virtual Desktop",WS_FLAGS,CRect(0,0,640,480),NULL,0,NULL);
Where WS_FLAGS = WS_VISIBLE|WS_MAXIMIZE|WS_CLIPCHILDREN|WS_CLIPSIBLINGS
I'm trying to create a full-screen main window... What window styles should I be using? Is the problem somewhere else?
Thanks,
Hardeep
Re: Please Help!!! CWnd::Create()
Hi Hardeep,
first of all you should register a window class with AfxRegisterWndClass. The result can be used as the class name (first parameter) in Create.
Martin