Page 1 of 1

Print system problems

Posted: Mon Mar 24, 2008 12:43 pm
by cdmmaui
Since upgrading to 8.02 I have found that my printer settings no longer work - they worked perfect with the previous version. The oPrinter:SetSize() does not work and the print preview still does not work. I have tried to pull the old rpreview.prg but there are still many problems. I have many forms that require oPrinter:SetSize() and this has become a major problem for me. Do I need to purchase the 8.03 upgrade to correct these problems? If I need to upgrade then can someone provide the correct code to call PRINTER PREVIEW from a dialog box as I must have dialog box so the user may select the necessary criteria for the printout. Thank you in advance for your assistance.

Posted: Mon Mar 24, 2008 6:02 pm
by Antonio Linares
Darrell,

We have not modified the source code of PrnSetSize() in source\classes\printdc.c.

Please check it in 8.02 and in the previous version that you were using, and you may find that they are the same:

Code: Select all

CLIPPER PRNSETSIZE( PARAMS )
{
   LPDEVMODE  lpDevMode;

   PrinterInit();

   lpDevMode  = (LPDEVMODE) GlobalLock( pd.hDevMode );

   lpDevMode->dmFields      = lpDevMode->dmFields | DM_PAPERSIZE |
                              DM_PAPERLENGTH | DM_PAPERWIDTH;
   lpDevMode->dmPaperSize   = DMPAPER_USER;
   lpDevMode->dmPaperWidth  = _parnl( 1 );
   lpDevMode->dmPaperLength = _parnl( 2 );

   GlobalUnlock( pd.hDevMode );
}

Posted: Mon Mar 24, 2008 6:08 pm
by Antonio Linares
Darrell,

In order to get the previous Print Preview behavior all is needed is to remove MDICHILD clause from source\classes\rpreview.prg

Without it, it should work as usual (without creating a MDICHILD window).