home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / pcmag / vol11n16.zip / WINCLIP.H < prev   
C/C++ Source or Header  |  1992-06-03  |  2KB  |  81 lines

  1. /* 
  2. WINCLIP.H -- DOS access to Windows Clipboard (Enhanced mode)
  3.  
  4. Copyright (c) 1992 Ziff Davis Communications
  5. PC Magazine * Andrew Schulman (June 1992)
  6. */
  7.  
  8. #ifdef METAWARE
  9. /* if using with 32-bit code */
  10. #define far _far
  11. #endif
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17. /* higher-level functions */
  18.  
  19. int WindowsClipboard(void);
  20. int Clipserv(void);
  21. int PutClipStrLen(char *str, unsigned len);
  22. int PutClipString(char *str);
  23. char *GetClipString(void);
  24. void FreeClipString(char *str);
  25.  
  26. /**********************************************************************/
  27.  
  28. /* lower-level functions */
  29.  
  30. #define CF_TEXT                1
  31. #define CF_BITMAP            2
  32. #define CF_METAFILEPICT        3
  33. #define CF_SYLK                4
  34. #define CF_DIF                5
  35. #define CF_TIFF                6
  36. #define CF_OEMTEXT            7
  37. #define CF_DSPTEXT            0x81
  38. #define CF_DSPBITMAP        0x82
  39.  
  40. typedef unsigned short CF_FORMAT;
  41.  
  42. #pragma pack(1)
  43.  
  44. typedef struct {
  45.     int           bmType;
  46.     int           bmWidth;
  47.     int           bmHeight;
  48.     int           bmWidthBytes;
  49.     unsigned char bmPlanes;
  50.     unsigned char bmBitsPixel;
  51.     unsigned char far * bmBits;
  52.     unsigned      bmWidDim;
  53.     unsigned      bmHigDim;
  54.     unsigned char BitmapData[1];
  55.     } BITMAP;
  56.  
  57. typedef struct {
  58.     int           mm;
  59.     int           xExt;
  60.     int           yExt;
  61.     unsigned char MetaFilePictData[1];
  62.   } METAFILEPICT;
  63.  
  64. unsigned long CompactClipboard(unsigned long size);
  65. unsigned CloseClipboard(void);
  66. unsigned EmptyClipboard(void);
  67. unsigned char far *GetClipboardData(CF_FORMAT format, 
  68.     unsigned char far *buf);
  69. unsigned long GetClipboardDataSize(CF_FORMAT format);
  70. unsigned GetDeviceCaps(unsigned index);
  71. unsigned IdentifyWinOldApVersion(void);
  72. unsigned OpenClipboard(void);
  73. unsigned SetClipboardData(CF_FORMAT format, unsigned char far *buf, 
  74.     unsigned long size);
  75. void Yield(void);
  76.  
  77. #ifdef __cplusplus
  78. }
  79. #endif
  80.  
  81.