home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 19.ddi / SAMPLES / DIBVIEW / PRINT.H_ / PRINT.H
Encoding:
C/C++ Source or Header  |  1993-02-08  |  3.9 KB  |  79 lines

  1.  
  2.  
  3.    // Units used for wUnits in DIBPrint().
  4.  
  5. #define UNITS_INCHES          0        // lpPrintRect in inches
  6. #define UNITS_STRETCHTOPAGE   1        // lpPrintRect n/a -- force to page size
  7. #define UNITS_BESTFIT         2        // lpPrintRect n/a -- force to as large as possible
  8. #define UNITS_SCALE           3        // lpPrintRect.top/left tells the stretch factor for x/y
  9. #define UNITS_PIXELS          4        // lpPrintRect in pixels
  10.  
  11.  
  12.    // Error return codes for DIBPrint().  Error are returned in a bitfield,
  13.    //  since more than one error can ocurr during the print.
  14.  
  15. #define ERR_PRN_NONE             0x00000000   // No error -- everything's A-OK!
  16. #define ERR_PRN_NODIB            0x00000001   // No DIB specified.
  17. #define ERR_PRN_NODC             0x00000002   // Couldn't get printer's DC.
  18. #define ERR_PRN_CANTBAND         0x00000004   // NEXTBAND not supported by printer.
  19. #define ERR_PRN_BANDINFO         0x00000008   // Error on BANDINFO escape.
  20. #define ERR_PRN_SETDIBITSTODEV   0x00000010   // Error in call to SetDIBitsToDevice().
  21. #define ERR_PRN_STRETCHDIBITS    0x00000020   // Error in call to StretchDIBits().
  22. #define ERR_PRN_STARTDOC         0x00000040   // Error in STARTDOC escape.
  23. #define ERR_PRN_SETABORTPROC     0x00000080   // Error in SETABORTPROC escape.
  24. #define ERR_PRN_STARTPAGE        0x00000100   // Error in StartPage().
  25. #define ERR_PRN_NEWFRAME         0x00000200   // Error in NEWFRAME or EndPage().
  26. #define ERR_PRN_ENDDOC           0x00000400   // Error in ENDDOC or EndDoc().
  27. #define ERR_PRN_NEXTBAND         0x00000800   // Error in NEXTBAND.
  28. #define ERR_PRN_NOFNSTARTDOC     0x00001000   // Error finding StartDoc() in GDI.
  29. #define ERR_PRN_NOFNSETABORTPROC 0x00002000   // Error finding SetAbortProc() in GDI.
  30. #define ERR_PRN_NOFNSTARTPAGE    0x00004000   // Error finding StartPage() in GDI.
  31. #define ERR_PRN_NOFNENDPAGE      0x00008000   // Error finding EndPage() in GDI.
  32. #define ERR_PRN_NOFNENDDOC       0x00010000   // Error findind EndDoc() in GDI.
  33.  
  34.  
  35.    // String table defines used by PRINT.C.
  36.  
  37. #define IDS_PRN_NONE              800  // No error -- everything's A-OK!
  38. #define IDS_PRN_NODIB             801  // No DIB specified.
  39. #define IDS_PRN_NODC              802  // Couldn't get printer's DC.
  40. #define IDS_PRN_CANTBAND          803  // NEXTBAND not supported by printer.
  41. #define IDS_PRN_BANDINFO          804  // Error on BANDINFO escape.
  42. #define IDS_PRN_SETDIBITSTODEV    805  // Error in call to SetDIBitsToDevice().
  43. #define IDS_PRN_STRETCHDIBITS     806  // Error in call to StretchDIBits().
  44. #define IDS_PRN_STARTDOC          807  // Error in STARTDOC escape.
  45. #define IDS_PRN_SETABORTPROC      808  // Error in SETABORTPROC escape.
  46. #define IDS_PRN_STARTPAGE         809  // Error in StartPage().
  47. #define IDS_PRN_NEWFRAME          810  // Error in NEWFRAME or EndPage().
  48. #define IDS_PRN_ENDDOC            811  // Error in ENDDOC or EndDoc().
  49. #define IDS_PRN_NEXTBAND          812  // Error in NEXTBAND.
  50. #define IDS_PRN_NOFNSTARTDOC      813  // Error finding StartDoc() in GDI.
  51. #define IDS_PRN_NOFNSETABORTPROC  814  // Error finding SetAbortProc() in GDI.
  52. #define IDS_PRN_NOFNSTARTPAGE     815  // Error finding StartPage() in GDI.
  53. #define IDS_PRN_NOFNENDPAGE       816  // Error finding EndPage() in GDI.
  54. #define IDS_PRN_NOFNENDDOC        817  // Error findind EndDoc() in GDI.
  55.  
  56.  
  57.    // Dialog box defines.
  58.  
  59. #define IDD_PRNPCT            100      // Print Percentage Done in PrintDlg
  60.  
  61.  
  62.    // User defined messages.
  63.  
  64. #define MYWM_CHANGEPCT        WM_USER+1000   // Sent to abort dialog to change % done text
  65.  
  66.  
  67.    // Function prototypes for functions called outside PRINT.C.
  68.  
  69. DWORD DIBPrint (HANDLE hDIB,
  70.                 LPRECT lpPrintRect,
  71.                   WORD wUnits,
  72.                  DWORD dwROP,
  73.                   BOOL fBanding,
  74.                   BOOL fUse31APIs,
  75.                  LPSTR lpszDocName);
  76.  
  77.  
  78. void ShowPrintError (HWND hWnd, DWORD dwError);
  79.