]>
Commit | Line | Data |
---|---|---|
2bda0e17 KB |
1 | // PRIVATE STUFF FOLLOWS UNTIL END |
2 | ||
3 | // Header signatures for various resources | |
4 | #define BFT_ICON 0x4349 /* 'IC' */ | |
5 | #define BFT_BITMAP 0x4d42 /* 'BM' */ | |
6 | #define BFT_CURSOR 0x5450 /* 'PT' */ | |
7 | ||
8 | // This WIDTHBYTES macro determines the number of BYTES per scan line. | |
9 | #define WIDTHBYTES( i) ((i + 31) / 32 * 4) | |
10 | #define IS_WIN30_DIB( lpbi) ((*(LPDWORD)( lpbi)) == sizeof( BITMAPINFOHEADER)) | |
11 | ||
12 | WORD DIBNumColors(LPSTR pv); | |
13 | WORD PaletteSize(LPSTR lpbi); | |
14 | ||
15 | ||
16 | struct tagCURFILEHEADER { WORD wReserved; // Always 0 | |
17 | WORD wResourceType; // 2 = cursor | |
18 | WORD wResourceCount; // Number of icons in the file | |
19 | }; | |
20 | ||
21 | typedef struct tagCURFILEHEADER CURFILEHEADER; | |
22 | ||
23 | struct tagCURFILERES { | |
24 | BYTE bWidth; // Width of image | |
25 | BYTE bHeight; // Height of image | |
26 | BYTE bColorCount; // Number of colors in image (2, 8, or 16) | |
27 | BYTE bReserved1; // Reserved | |
28 | WORD wXHotspot; // x coordinate of hotspot | |
29 | WORD wYHotspot; // y coordinate of hotspot | |
30 | DWORD dwDIBSize; // Size of DIB for this image | |
31 | DWORD dwDIBOffset; // Offset to DIB for this image | |
32 | }; | |
33 | ||
34 | typedef struct tagCURFILERES CURFILERES; | |
35 | ||
6c00e46f | 36 | HANDLE ReadCur( LPTSTR szFileName, LPPOINT lpptHotSpot, int *W = 0, int *H = 0); |
2bda0e17 KB |
37 | HBITMAP ColorDDBToMonoDDB( HBITMAP hbm); |
38 | HCURSOR MakeCursor( HANDLE hDIB, LPPOINT lpptHotSpot, HINSTANCE hInst); | |
39 | ||
40 | struct tagICONFILEHEADER { | |
41 | WORD wReserved; // Always 0 | |
42 | WORD wResourceType; // 1 = icon | |
43 | WORD wResourceCount; // Number of icons in the file | |
44 | }; | |
45 | ||
46 | typedef struct tagICONFILEHEADER ICONFILEHEADER; | |
47 | ||
48 | struct tagICONFILERES { | |
49 | BYTE bWidth; // Width of image | |
50 | BYTE bHeight; // Height of image | |
51 | BYTE bColorCount; // Number of colors in image (2, 8, or 16) | |
52 | BYTE bReserved1; // Reserved | |
53 | WORD wReserved2; | |
54 | WORD wReserved3; | |
55 | DWORD dwDIBSize; // Size of DIB for this image | |
56 | DWORD dwDIBOffset; // Offset to DIB for this image | |
57 | }; | |
58 | ||
59 | typedef struct tagICONFILERES ICONFILERES; | |
60 | ||
d9a451ce | 61 | HANDLE ReadIcon( wxChar *szFileName, int *W = 0, int *H = 0); |
2bda0e17 KB |
62 | HICON MakeIcon( HANDLE hDIB, HINSTANCE hInst); |
63 |