Rev | Line | |
---|
[2469] | 1 | /* $Id: icon.h,v 1.7 2000-01-18 20:08:10 sandervl Exp $ */
|
---|
| 2 |
|
---|
| 3 | /*
|
---|
| 4 | *
|
---|
| 5 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
| 6 | *
|
---|
| 7 | */
|
---|
| 8 | /*
|
---|
| 9 | * Win32 icon conversion functions for OS/2
|
---|
| 10 | *
|
---|
| 11 | * Copyright 1998 Sander van Leeuwen
|
---|
| 12 | *
|
---|
| 13 | */
|
---|
| 14 | #ifndef __ICON_H__
|
---|
| 15 | #define __ICON_H__
|
---|
| 16 |
|
---|
| 17 | extern "C" PBYTE ConvertWin32Icon(PBYTE presbits, DWORD dwResSize, DWORD *OS2ResSize);
|
---|
| 18 | extern "C" void FreeIcon(void *os2icon);
|
---|
| 19 |
|
---|
| 20 |
|
---|
| 21 | #ifdef _ICON_C_
|
---|
| 22 |
|
---|
| 23 | #pragma pack(1)
|
---|
| 24 |
|
---|
| 25 | typedef struct {
|
---|
| 26 | WORD wReserved; // Currently zero
|
---|
| 27 | WORD wType; // 1 for icons
|
---|
| 28 | WORD wCount; // Number of components
|
---|
| 29 | //Fout in docs, geen padding
|
---|
| 30 | // WORD padding; // filler for DWORD alignment
|
---|
| 31 | } IconHeader;
|
---|
| 32 |
|
---|
| 33 | typedef struct tagWINBITMAPINFOHEADER{
|
---|
| 34 | DWORD biSize;
|
---|
| 35 | LONG biWidth;
|
---|
| 36 | LONG biHeight;
|
---|
| 37 | WORD biPlanes;
|
---|
| 38 | WORD biBitCount;
|
---|
| 39 | DWORD biCompression;
|
---|
| 40 | DWORD biSizeImage;
|
---|
| 41 | LONG biXPelsPerMeter;
|
---|
| 42 | LONG biYPelsPerMeter;
|
---|
| 43 | DWORD biClrUsed;
|
---|
| 44 | DWORD biClrImportant;
|
---|
| 45 | } WINBITMAPINFOHEADER;
|
---|
| 46 |
|
---|
| 47 | typedef struct
|
---|
| 48 | {
|
---|
| 49 | BYTE blue;
|
---|
| 50 | BYTE green;
|
---|
| 51 | BYTE red;
|
---|
| 52 | BYTE res;
|
---|
| 53 | } RGBQUAD;
|
---|
| 54 |
|
---|
| 55 | //The next portion is repeated for each component resource:
|
---|
| 56 | typedef struct {
|
---|
| 57 | BYTE bWidth;
|
---|
| 58 | BYTE bHeight;
|
---|
| 59 | BYTE bColorCount;
|
---|
| 60 | BYTE bReserved;
|
---|
| 61 | WORD wPlanes;
|
---|
| 62 | WORD wBitCount;
|
---|
| 63 | DWORD lBytesInRes;
|
---|
| 64 | WORD wNameOrdinal; // Points to component
|
---|
| 65 | //Fout in docs, geen padding
|
---|
| 66 | // WORD padding; // filler for DWORD alignment
|
---|
| 67 | } ResourceDirectory;
|
---|
| 68 |
|
---|
| 69 | #pragma pack()
|
---|
| 70 |
|
---|
| 71 | #endif
|
---|
| 72 |
|
---|
| 73 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.