]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/curicop.h
HTML_xxxx constants changed to wxHTML_xxxx (with backward compatibility through WXWIN...
[wxWidgets.git] / include / wx / msw / curicop.h
CommitLineData
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' */
e90c1d2a 6#define BFT_CURSOR 0x5450 /* 'PT(' */
2bda0e17
KB
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
12WORD DIBNumColors(LPSTR pv);
13WORD PaletteSize(LPSTR lpbi);
14
15
16struct tagCURFILEHEADER { WORD wReserved; // Always 0
17 WORD wResourceType; // 2 = cursor
18 WORD wResourceCount; // Number of icons in the file
19 };
20
21typedef struct tagCURFILEHEADER CURFILEHEADER;
22
23struct 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
34typedef struct tagCURFILERES CURFILERES;
35
6c00e46f 36HANDLE ReadCur( LPTSTR szFileName, LPPOINT lpptHotSpot, int *W = 0, int *H = 0);
2bda0e17
KB
37HBITMAP ColorDDBToMonoDDB( HBITMAP hbm);
38HCURSOR MakeCursor( HANDLE hDIB, LPPOINT lpptHotSpot, HINSTANCE hInst);
39
40struct tagICONFILEHEADER {
41 WORD wReserved; // Always 0
42 WORD wResourceType; // 1 = icon
43 WORD wResourceCount; // Number of icons in the file
44 };
45
46typedef struct tagICONFILEHEADER ICONFILEHEADER;
47
48struct 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
59typedef struct tagICONFILERES ICONFILERES;
60
d9a451ce 61HANDLE ReadIcon( wxChar *szFileName, int *W = 0, int *H = 0);
2bda0e17
KB
62HICON MakeIcon( HANDLE hDIB, HINSTANCE hInst);
63