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