From: Dom Lachowicz (domlachowicz@yahoo.com)
Date: Fri May 02 2003 - 14:20:31 EDT
--- Mike Nordell <tamlin@algonet.se> wrote:
> 2. Use the HANDLE (HGLOBAL) to the current printers
> DEVMODE from the
> PRINTDLG struct from the XAP_Win32Dialog_Print
> class.
This seems like a good idea.
> I believe the latter would be "better", both since
> it wouldn't require the
> code to (somehow) get the printer name from
> somewhere, and also since it's
> already allocated and initialized. A problem is that
> this would probably
> require some unfortunate refactoring, especially the
> call to s_actuallyPrint
> (ap_EditMethods.cpp, 6578) would have to be abe to
> (directly or indirectly)
> get the mentioned HANDLE/HGLOBAL and pass it on to
> GR_Win32Graphics::startPage.
It would require near-0 refactoring. The printing
routine already asks for the Print Dialog to create
the required GR_Graphics subclass that we'll use when
printing. Adapt the GR_Win32Graphics' constructor to
take a pointer to a DEVMODE struct, and inside of
xap_Win32Dlg_Print::getGraphics() you will pass the
DEVMODE pointer into the class. Finito.
> But on the other hand, the comment at line 6571 in
> ap_EditMethods.cpp
> suggests orientation can not change per page, only
> for the whole document.
> If so, perhaps the ResetDC call inside
> GR_Win32Graphics::startPage isn't
> even needed?
My Win32-foo is weak, but the ResetDC call is either
necessary or harmless, provided we use the correct
DEVMODE supplied by the printer dialog.
> Anyway, this seems to be a way too complex matter
> for me to investigate
> right now. Sorry I couldn't be of more help.
It's ok, you gave it a stab. Anyone care to take me up
on these suggestions, then?
Cheers,
Dom
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
This archive was generated by hypermail 2.1.4 : Fri May 02 2003 - 14:32:37 EDT