home *** CD-ROM | disk | FTP | other *** search
/ BUG 4 / BUGCD1997_05.BIN / aplic / clip4win / clip4win.exe / C4W30E.HUF / SOURCE / PRT.PRG < prev    next >
Text File  |  1993-02-17  |  876b  |  31 lines

  1. #include "windows.ch"
  2. #include "commdlg.ch"
  3.  
  4. ...  Sorry about this code snippet, but you should get the idea.
  5.  
  6.     aPrintDlg = array(PD_Length)
  7.     aPrintDlg[PD_hwndOwner] = hWnd
  8.     aPrintDlg[PD_nFlags] = PD_RETURNDC    // this is also the default
  9.     // you don't have to init these 2:
  10.     aPrintDlg[PD_nMinPage] = 1
  11.     aPrintDlg[PD_nMaxPage] = 10
  12.     i = PrintDlg(aPrintDlg)
  13.     // can get i set to:
  14.     //    nil    error occurred (e.g. aPrintDlg is bad)
  15.     //    .f.    user cancelled
  16.     //    .t.    ok, and aPrintDlg[PD_hDC] is set up
  17.     if i == .t.
  18.  
  19.         // you'd print here!
  20.  
  21.         ? "hDC", aPrintDlg[PD_hDC]
  22.         ? "nFlags", aPrintDlg[PD_nFlags]
  23.         ? "nFromPage", aPrintDlg[PD_nFromPage]
  24.         ? "nToPage", aPrintDlg[PD_nToPage]
  25.         ? "nMinPage", aPrintDlg[PD_nMinPage]
  26.         ? "nMaxPage", aPrintDlg[PD_nMaxPage]
  27.         ? "nCopies", aPrintDlg[PD_nCopies]
  28.  
  29.         DeleteDC(aPrintDlg[PD_hDC])    // don't forget this!
  30.     endif
  31.