From: Mike Nordell (firstname.lastname@example.org)
Date: Fri May 02 2003 - 13:11:44 EDT
Dom Lachowicz wrote:
> If you could cook up a patch and send it to the list,
> I'm sure that Jordi or Jeremy could apply and test
> that printing works at least as well as it does now.
It seems to be a little more complicated than I expected I'm afraid...
What we know is that we need a DEVMODE memory buffer large enough to hold
private printer data, and this _only_ for the purpose of telling the printer
driver to switch portrait<->landscape. There are (AFAIK) two ways to get
1. Calling OpenPrinter, which require us to know the printer name, and then
using that handle to call DocumentProperties which can provide this size.
2. Use the HANDLE (HGLOBAL) to the current printers DEVMODE from the
PRINTDLG struct from the XAP_Win32Dialog_Print class.
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
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
Anyway, this seems to be a way too complex matter for me to investigate
right now. Sorry I couldn't be of more help.
Amazing how wrong some companies can design programming interfaces...
This archive was generated by hypermail 2.1.4 : Fri May 02 2003 - 13:23:23 EDT