After I derived my View from CPreview, i have now a preview screen but when i am in my preview screen and when i print or when i close this screen the program broken down, what to do ?
Printable View
After I derived my View from CPreview, i have now a preview screen but when i am in my preview screen and when i print or when i close this screen the program broken down, what to do ?
check it in ur CView:
debug and check ,
and try doing direcly into ur print that is [instead of print preview.it helps u to find the issue (if any) easier .Code:ID_FILE_PRINT
You should not derive you view from CPreviewView. You should make sue of the standard MFC print/preview architecture.
To do this derive from CView and override the OnPreparePrinting/OnBegin/EndPrinting and OnPrint functions.
You should then just only need to add a ON_COMMAND(ID_FILE_PRINT_PREVIEW, ONPrintPreview) handler to get a free preview function.
I don't understand well,
Would you like to send me an example
Please
Thanks
if u can attach ur function ...then it will be a very good help to know the bug . :rolleyes:
Please Sir ,
When I derive a view from CView i have this error :cannot instantiate abstract class due to following members: impression(name of my view) in this ligne of impression.cpp: IMPLEMENT_DYNCREATE(impressionnat,CView)
That 's why i want that you send me an example.
The first view when i generate the project is working well and print preview is working well, but when I make an another view i have many probleme.
What to do exactly