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
Re: Problem with CFrameWnd::GetActiveView
Quote:
Originally Posted by
maverick786us
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! :confused:
Besides: is your app MDI or SDI or something else?
2 Attachment(s)
Re: Problem with CFrameWnd::GetActiveView
Quote:
Originally Posted by
VictorN
And where are these .zip files? I don't see any attachment in your post! :confused:
Besides: is your app MDI or SDI or something else?
Its a Dialog based application
Re: Problem with CFrameWnd::GetActiveView
There are no frames, views or documents in a dialog based app.