Hey,
Heres the problem. I use the OnFilePrintPreview and OnEndPrintPreview methods of the various views. I have overridden these methods just for some appilication specific calls, but at the end of that i still call the base class for these methods. That all works well but when I preview a document and then open another document it fails, basically i want to be able to call the OnEndPrintPreview method when i open a new document (just in case) but dont know what the message call is can you help
Thanks
Will

Print Preview Issue
Tanya R. - MSFT
CFrame::GetActiveView() What do i set this equal to A CView
The "DYNAMIC_DOWNCAST". This refers to a class and a pointer, I'm guessing that the pointer is the CPreviewView So whats the class
And the OnPreviewClose method, i have looked at that in the developer site but it seems to come under Visual fox pro I'm using C++ If this is a method that can be used in C++ then how is it called Stumped on nearly all of this
Thanks for your help
Will
SnowLover
Thanks
I've gotten it working now, I couldnt seem to get the DYNAMIC_DOWNCAST to work, it always seemed to return null no matter what. I got round this using a flag,
Thanks v. much for your help
Will
KrazyKevin
Will
Joshua Sells
Doooh.. OK just saw the class and its methods. Sorry
OK must be easier.
Just do the following
AfxGetMainWnd()->SendMessage(WM_COMMAND,AFX_ID_PREVIEW_CLOSE);
Should work.
Scott21
its MDI, what should i use for that
Thanks
Will
OHDev
CFrame::GetActiveView is the function to retrieve the current active View from a frame! So if you have an SDI application you can get the current active View!
When the preview View is active your current View class is replaced by a CPreviewView object.
So in short:
DYNAMIC_DOWNCAST(CPreviewView,pView) should return a pointer to the CPreviewView class object.
OnPreviewClose is no documented function. It is the implementation of the for the handler when the user presses the Close button in the preview.
Is this application MDI or SDI
Pradeep Raj
There is a post earlier on which it says its MDI, whats the script sample do u have a link
Thanks
Will
Sacristy
http://msdn.microsoft.com/library/en-us/vcsample/html/_sample_mfc_scribble.asp
sieler
But when i come to use the OnPreviewClose, I am confused as to how to use it Are we talking just the call ie.
OnPreviewClose():
or via the pView pointer
pView->OnPreviewClose();
Or something entirely different
Thanks for your help with this
Will
Mishkina
Edward V. Wright
Thanks
Will
Anujpathania
I asked it but never get an answer
MDI or SDI It just guess and say MDI!
I just checked this with the scribble sample and it does not show this behaviour.