D2010 - trouble selecting paper bins - FIX found

  • Selecting a different paper bin for the 1st page and the subsequent pages has proved to be a bit of a headache, working on some printers, not others, not always etc ....

    This is a fix for D2010 (and I suspect D2009 too) :

    in WPCTRMEMO, the function ResetDCA is declared and it's declaration is wrong compared to the resetDCA function present in windows.pas; even when corrected the function would not work as it expects a pdevicemodeA and we're working with a pdevicemodeW (default in D2010 a pdeviceMode IS a pdevicemodeW)

    so in the function updatePrinterProperties replace the call to

    ResetDCA(aPrinter.Handle, DevMode);

    by

    ResetDC (aPrinter.Handle, devmode^);

    and all should work, at least it works here and at my client's offices.


    For good measure, you should also comment out the resetDCA definition in the sama source file.


    Hope this helps someone


    Didier