CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    69

    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



  2. #2
    Join Date
    Apr 1999
    Location
    Germany
    Posts
    418

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured