home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / msysjour / vol04 / 02b / project / act / printer.act < prev    next >
Text File  |  1988-09-01  |  1KB  |  48 lines

  1. /* PRINTER.ACT - file to maintain the MS-Windows ESCAPE function modes and
  2.                  miscellaneous modifications to the system classes
  3.  
  4.   Mark Solinski, The Whitewater Group.
  5.  
  6. */
  7.  
  8. /* GDI escapes */
  9. #define NEWFRAME            1
  10. #define ABORTDOC            2
  11. #define NEXTBAND            3
  12. #define SETCOLORTABLE       4
  13. #define GETCOLORTABLE       5
  14. #define FLUSHOUTPUT         6
  15. #define DRAFTMODE           7
  16. #define QUERYESCSUPPORT     8
  17. #define SETABORTPROC        9
  18. #define STARTDOC            10
  19. #define ENDDOC              11
  20. #define GETPHYSPAGESIZE     12
  21. #define GETPRINTINGOFFSET   13
  22. #define GETSCALINGFACTOR    14
  23. !!
  24.  
  25. /* Device Parameters for GetDeviceCaps() */
  26. #define HORZSIZE      4     /*  Horizontal size in millimeters        */
  27. #define VERTSIZE      6     /*  Vertical   size in millimeters        */
  28. #define HORZRES       8     /*  Horizontal width in pixels            */
  29. #define VERTRES       10    /*  Vertical   width in pixels            */
  30. !!
  31.  
  32. now(Object);!!
  33.  
  34. /* Return the string from win.ini.  If not found, 
  35.   return zero-length string.  */
  36. Def  getProfileString(self, sectionName, key, dStr,
  37. nSize | str, ans, len)
  38. { str := new(String, nSize);
  39.   len := Call GetProfileString(lP(sectionName),
  40.   lP(key), lP(dStr), lP(str), nSize);
  41.   ans := subString(getText(str), 0, len) ;
  42.   freeHandle(sectionName);
  43.   freeHandle(key);
  44.   freeHandle(dStr);
  45.   freeHandle(str);
  46.   ^ans;
  47. }!!
  48.