CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: CFormView

  1. #1
    Join Date
    Apr 1999
    Posts
    30

    CFormView

    Why should I use a CFormView rather than a dialog box, what are the additional fetures coming with it


  2. #2
    Join Date
    Apr 1999
    Posts
    51

    Re: CFormView

    If I'm thinking of the same thing you are, you get a menu, toolbar and status bar for free.

    You also get the printing features and help stubs.




  3. #3
    Join Date
    Apr 1999
    Posts
    30

    Re: CFormView

    What about the serailization,will I have a chance with the serialization also


  4. #4
    Join Date
    Apr 1999
    Posts
    51

    Re: CFormView

    Yes, if it's an SDI or MDI app, you get serialization stubs too.
    Using the CFormView gives you the option of adding controls as you would with a dialog. I don't think you lose anything by going with a CFormView.

    I have a CFormView based application here at work (that I'm writing).




  5. #5
    Guest

    Re: CFormView

    > You also get the printing features

    I just ran into a particular "mis-feature" of CFormView which puts this statement into some doubt. I have a multi-view app where I used CFormView for a number of my views (because each contains only a single window-size ActiveX control, and ClassWiz makes ActiveX event mapping easy within form views). When I started hooking up printing for the first CFormView-based view I got this [annoying!] debug output:

    "Warning: CFormView does not support printing.\n"

    which you can find in the MFC surce code VIEWFORM.CPP, in OnDraw() :

    // do nothing - dialog controls will paint themselves,
    // and Windows dialog controls do not support printing
    #ifdef _DEBUG
    if (pDC->IsPrinting())
    TRACE0("Warning: CFormView does not support printing.\n");
    #endif


    ;-(

    Which, of course, begs the question - is it really that rare to want to print form views? ( No, the ActiveX controls in my views aren't text-based or database-based ).



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