dumb.H
上传用户:yuandong
上传日期:2022-08-08
资源大小:954k
文件大小:2k
源码类别:

Delphi控件源码

开发平台:

C++ Builder

  1. /****************************************************************************
  2. *                                                                           *
  3. * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY     *
  4. * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE       *
  5. * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR     *
  6. * PURPOSE.                                                                  *
  7. *                                                                           *
  8. * Copyright (C) 1993-95  Microsoft Corporation.  All Rights Reserved.       *
  9. *                                                                           *
  10. ****************************************************************************/
  11. // DUMB.H
  12. #define MAX_LEN         128
  13. #define BUF_CHUNK       32768
  14. #define CB_LANDSCAPE    0x0001
  15. #define IDE_FILENAME    100
  16. #define DW_WIDTHBYTES(bits) (((bits)+31)/32*4)
  17. #define LPDV_DEFINED
  18. // documented part of UNIDRV.DLL's PDEVICE
  19. typedef struct
  20.     {
  21.     short  iType;
  22.     short  oBruteHdr;
  23.     HANDLE hMd;
  24.     LPSTR  lpMd;
  25.     } PDEVICE, FAR * LPDV;
  26. // private data for DUMP callback.
  27. typedef struct
  28.     {
  29.       char       szDIBFile[MAX_LEN];
  30.       HFILE      hDIBFile;
  31.       OFSTRUCT   of;
  32.       DWORD      dwScanBufSize;
  33.       DWORD      dwTotalScanBytes;
  34.       DWORD      dwTotalScans;
  35.       WORD       wWidthBytes;
  36.       HANDLE     hScanBuf;
  37.       char _huge *lpScanBuf;
  38.       WORD       wHdrSize;
  39.       HDC        hAppDC;
  40.       int        iPageNum;
  41.     } EXTPDEV, FAR *LPEXTPDEV;
  42. typedef struct tagBITMAPFILEHEADER
  43. {
  44.     UINT    bfType;
  45.     DWORD   bfSize;
  46.     UINT    bfReserved1;
  47.     UINT    bfReserved2;
  48.     DWORD   bfOffBits;
  49. } BITMAPFILEHEADER;
  50. typedef BITMAPFILEHEADER*      PBITMAPFILEHEADER;
  51. typedef BITMAPFILEHEADER FAR* LPBITMAPFILEHEADER;
  52. short FAR PASCAL fnDump(LPDV, LPPOINT, WORD);
  53. BOOL FAR PASCAL FileDlgProc(HWND, WORD, WPARAM, LPARAM);
  54. short WINAPI Control(LPDV, WORD, LPSTR, LPSTR);