MFC Printing after Previewing
Charles Prineas -- onramp@magna.com.au
Tuesday, November 05, 1996
Environment: MSVC 4.0, Windows NT 3.51
Is there any way to determine if a Print request has been initiated from
inside a
Print Preview (ie, by pressing Print while previewing)?
I have had a look at the CPrintInfo structure passed to OnBeginPrinting() and
OnEndPrintPreview() but there doesn't seem to be anything useful there.
Thanks,
Charles Prineas | http://www.prineas.com/
| Resources for REAL Programmers
Bob Sterling -- BobS@Micronetics.com
Thursday, November 07, 1996
An easy way would be to make the id of the menu item be something
different (ID_PRINT_MENU) and map that to a different function. You
could set a flag in the class to let you know that you are doing it from
the menu (ie, not print preview) and process printing normally.
--Bob Sterling
>----------
>From: Charles Prineas[SMTP:onramp@magna.com.au]
>Sent: Monday, November 04, 1996 9:25 PM
>To: mfc-l@netcom.com
>Subject: MFC Printing after Previewing
>
>Environment: MSVC 4.0, Windows NT 3.51
>
>Is there any way to determine if a Print request has been initiated from
>inside a
>Print Preview (ie, by pressing Print while previewing)?
>
>I have had a look at the CPrintInfo structure passed to OnBeginPrinting() and
>OnEndPrintPreview() but there doesn't seem to be anything useful there.
>
>Thanks,
>Charles Prineas | http://www.prineas.com/
> | Resources for REAL Programmers
>
Quang Ngo -- jaguar@gaianet.net
Friday, November 08, 1996
In worst case, you can always use a boolean flag. Set it to TRUE when
preview is called and reset it back to FALSE when printing is done or
canceled.
_,'| _.-''``-...___..--';)
/_ \'. __..-' , ,--...--''' Quang Ngo
<\ .`--''' ` /' jaguar@gaianet.net
`-';' ; ; ;
__...--'' ___...--_..' .;.'
(,__....----''' (,..--''
----------
> From: mfc-l@netcom.com
> To: Jaguar
> Subject: MFC Printing after Previewing
> Date: Thursday, November 07, 1996 10:44 PM
>
>
> Environment: MSVC 4.0, Windows NT 3.51
>
> Is there any way to determine if a Print request has been initiated from
> inside a
> Print Preview (ie, by pressing Print while previewing)?
>
> I have had a look at the CPrintInfo structure passed to OnBeginPrinting()
and
> OnEndPrintPreview() but there doesn't seem to be anything useful there.
>
> Thanks,
> Charles Prineas | http://www.prineas.com/
> | Resources for REAL Programmers
| Вернуться в корень Архива
|