CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2005
    Posts
    1,828

    Problem with CFrameWnd::GetActiveView

    I am using CView Print Preview class to display everything in print preview function. But there is a problem with GetActiveView function as it returns null

    Code:
    m_pView =(CViewPrintPreview*)pFrameWnd->GetActiveView();
    It does have a CView Derived Class and I am creating a CDocument Object at run time. You can see the source code of the DLL (PrintReport.zip). PrintPreview is the EXE application that will run this DLL. You see there are 3 reports that are generated. For first 2 reports GetActiveView returns the handle only in case of 3rd report it returns NULL.


    https://skydrive.live.com/redir.aspx...ive&Bsrc=Share


    https://skydrive.live.com/redir.aspx...ive&Bsrc=Share

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Problem with CFrameWnd::GetActiveView

    Quote Originally Posted by maverick786us View Post
    You can see the source code of the DLL (PrintReport.zip). PrintPreview is the EXE application that will run this DLL
    And where are these .zip files? I don't see any attachment in your post!

    Besides: is your app MDI or SDI or something else?
    Victor Nijegorodov

  3. #3
    Join Date
    Apr 2005
    Posts
    1,828

    Re: Problem with CFrameWnd::GetActiveView

    Quote Originally Posted by VictorN View Post
    And where are these .zip files? I don't see any attachment in your post!

    Besides: is your app MDI or SDI or something else?
    Its a Dialog based application
    Attached Files Attached Files

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,637

    Re: Problem with CFrameWnd::GetActiveView

    There are no frames, views or documents in a dialog based app.

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