home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / WBITMAP.ZIP / ICNFILE.H < prev    next >
C/C++ Source or Header  |  1991-10-15  |  1KB  |  64 lines

  1. /*
  2. **    $id: ssvcid icnfile.h 1.0 10/15/91  9:50 am$
  3. **        Function prototypes and structures used with loading icons from disk.
  4. **
  5. **    (C) 1991    Larry Widing
  6. */
  7. #ifndef    __ICNFILE_H__
  8. #define    __ICNFILE_H__    1
  9.  
  10. #if    defined(CDECL)
  11.     #undef    CDECL
  12. #endif
  13.  
  14. #if    !defined(CDECL)
  15.     #if    defined(__cplusplus)
  16.         #define    CDECL    "C"
  17.     #else
  18.         #define    CDECL
  19.     #endif
  20. #endif
  21.  
  22. /*
  23. ** Icon File Directory Entry Format
  24. */
  25. struct IconData {
  26.     BYTE        width;            // width of icon (16, 32, 64)
  27.     BYTE        height;            // height of icon (16, 32, 64)
  28.     BYTE        colorCount;        // number of colors in icon (2, 8, 16)
  29.     BYTE        reserved0;        // reserved for future use
  30.     WORD        reserved1;        // reserved for future use
  31.     WORD        reserved2;        // reserved for future use
  32.     DWORD        icoDIBSize;        // size, in bytes, of icon image
  33.     DWORD        icoDIBOffset;    // offset, in bytes, from start of file to image
  34. };
  35. typedef struct IconData ICONDATA;
  36.  
  37. /*
  38. **    Icon File Header Format
  39. */
  40. struct IconFileHeader {
  41.     WORD    icoReserved;        // must be 0
  42.     WORD    icoResourceType;    // must be 1
  43.     WORD    icoResourceCount;    // number of images in this file
  44. };
  45. typedef struct IconFileHeader ICONFILEHEADER;
  46.  
  47. extern ICONDATA            CurIcon;
  48. extern ICONFILEHEADER    CurIconFile;
  49.  
  50. /*
  51. **    Function Prototypes
  52. */
  53. extern CDECL HICON ReadIconFile(const char *filename);
  54.  
  55. #endif    /* !defined(__ICNFILE_H__) */
  56.  
  57. /*
  58. **    Modification History
  59. **    --------------------
  60. **    $lgb$
  61. ** 10/15/91     Larry Widing   Initial version for Win Tech Journal Article.
  62. **    $lge$
  63. */
  64.