Changeset 3625 for trunk/src/kernel32/cvticongrp.cpp
- Timestamp:
- May 28, 2000, 6:45:14 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/cvticongrp.cpp
r2802 r3625 1 /* $Id: cvticongrp.cpp,v 1. 6 2000-02-16 14:25:37sandervl Exp $ */1 /* $Id: cvticongrp.cpp,v 1.7 2000-05-28 16:45:12 sandervl Exp $ */ 2 2 3 3 /* … … 23 23 #include <string.h> 24 24 #include <win32type.h> 25 #include <win32api.h> 26 #include <winconst.h> 25 27 #include <winicon.h> 26 #include <winres.h>27 28 #include <misc.h> 28 29 #include "cvtresource.h" 30 #include <winres.h> 29 31 30 32 #define DBG_LOCALLOG DBG_cvticongrp 31 33 #include "dbglocal.h" 32 33 HRSRC WIN32API FindResourceA(HINSTANCE hModule, LPCSTR lpszName, LPCSTR lpszType);34 34 35 35 //****************************************************************************** … … 41 41 BITMAPARRAYFILEHEADER2 *bafh, *orgbafh; 42 42 WINBITMAPINFOHEADER *iconhdr; 43 Win32Resource *winres;44 43 void *os2icon; 44 HRSRC hRes; 45 45 46 46 dprintf(("Icon Group type :%d", ihdr->wType)); … … 53 53 dprintf2(("Bits : %d", rdir->wBitCount)); 54 54 dprintf2(("ResBytes: %d", rdir->lBytesInRes)); 55 winres = (Win32Resource *)FindResourceA(module->getInstanceHandle(),56 (LPCSTR)rdir->wNameOrdinal,57 (LPSTR)NTRT_ICON); 58 groupsize += winres->getOS2Size();55 hRes = FindResourceA(module->getInstanceHandle(), 56 (LPCSTR)rdir->wNameOrdinal, (LPSTR)NTRT_ICON); 57 58 groupsize += QueryConvertedResourceSize(module->getInstanceHandle(), (char *)NTRT_ICON, hRes); 59 59 rdir++; 60 60 } … … 68 68 bafh->cxDisplay = 0; 69 69 bafh->cyDisplay = 0; 70 winres = (Win32Resource *)FindResourceA(module->getInstanceHandle(),71 (LPCSTR)rdir->wNameOrdinal,72 (LPSTR)NTRT_ICON); 73 if( winres == NULL) {70 hRes = FindResourceA(module->getInstanceHandle(), 71 (LPCSTR)rdir->wNameOrdinal, (LPSTR)NTRT_ICON); 72 73 if(hRes == NULL) { 74 74 dprintf(("Can't find icon!")); 75 75 rdir++; … … 77 77 } 78 78 79 iconhdr = (WINBITMAPINFOHEADER *) winres->lockResource();80 os2icon = ConvertIcon(iconhdr, winres->getSize(), &os2iconsize, (int)bafh - (int)orgbafh + sizeof(BITMAPARRAYFILEHEADER2)-sizeof(BITMAPFILEHEADER2));79 iconhdr = (WINBITMAPINFOHEADER *)LockResource(LoadResource(module->getInstanceHandle(), hRes)); 80 os2icon = ConvertIcon(iconhdr, SizeofResource(module->getInstanceHandle(), hRes), &os2iconsize, (int)bafh - (int)orgbafh + sizeof(BITMAPARRAYFILEHEADER2)-sizeof(BITMAPFILEHEADER2)); 81 81 82 82 if(os2icon == NULL) { 83 83 dprintf(("Can't convert icon!")); 84 delete winres;85 84 rdir++; 86 85 continue; … … 96 95 97 96 bafh = (BITMAPARRAYFILEHEADER2 *)((int)&bafh->bfh2 + os2iconsize); 98 delete winres;99 97 100 98 rdir++;
Note:
See TracChangeset
for help on using the changeset viewer.