Changeset 6482 for trunk/src/kernel32


Ignore:
Timestamp:
Aug 7, 2001, 11:34:16 PM (24 years ago)
Author:
sandervl
Message:

put back icon (group) conversion code

Location:
trunk/src/kernel32
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/KERNEL32.DEF

    r6471 r6482  
    1 ; $Id: KERNEL32.DEF,v 1.119 2001-08-06 19:36:41 sandervl Exp $
     1; $Id: KERNEL32.DEF,v 1.120 2001-08-07 21:34:15 sandervl Exp $
    22
    33;Basis is Windows95 KERNEL32
     
    11901190    strncmpiW                                                     @2022 NONAME
    11911191
     1192    _ConvertIconGroup@12                                          @2023 NONAME
     1193
    11921194    GetDisplayCodepage__Fv                                        @3000 NONAME
    11931195    GetWindowsCodepage__Fv                                        @3001 NONAME
  • trunk/src/kernel32/cvticongrp.cpp

    r3625 r6482  
    1 /* $Id: cvticongrp.cpp,v 1.7 2000-05-28 16:45:12 sandervl Exp $ */
     1/* $Id: cvticongrp.cpp,v 1.8 2001-08-07 21:34:16 sandervl Exp $ */
    22
    33/*
     
    3535//******************************************************************************
    3636//******************************************************************************
    37 void *ConvertIconGroup(IconHeader *ihdr, int size, Win32ImageBase *module)
     37void * WIN32API ConvertIconGroup(void *hdr, HINSTANCE hInstance, DWORD *ressize)
    3838{
     39 IconHeader *ihdr = (IconHeader *)hdr;
    3940 ResourceDirectory *rdir = (ResourceDirectory *)(ihdr + 1);
    4041 int i, groupsize = 0, os2iconsize;
     
    5354        dprintf2(("Bits    : %d", rdir->wBitCount));
    5455        dprintf2(("ResBytes: %d", rdir->lBytesInRes));
    55         hRes = FindResourceA(module->getInstanceHandle(),
     56        hRes = FindResourceA(hInstance,
    5657                             (LPCSTR)rdir->wNameOrdinal, (LPSTR)NTRT_ICON);
    5758
    58         groupsize += QueryConvertedResourceSize(module->getInstanceHandle(), (char *)NTRT_ICON, hRes);
     59        groupsize += QueryConvertedResourceSize(hInstance, (char *)NTRT_ICON, hRes);
    5960        rdir++;
    6061  }
    61   bafh    = (BITMAPARRAYFILEHEADER2 *)malloc(groupsize+ihdr->wCount*sizeof(BITMAPARRAYFILEHEADER2));
     62  groupsize = groupsize+ihdr->wCount*sizeof(BITMAPARRAYFILEHEADER2);
     63  bafh    = (BITMAPARRAYFILEHEADER2 *)malloc(groupsize);
    6264  orgbafh = bafh;
    6365
     
    6870        bafh->cxDisplay = 0;
    6971        bafh->cyDisplay = 0;
    70         hRes = FindResourceA(module->getInstanceHandle(),
     72        hRes = FindResourceA(hInstance,
    7173                             (LPCSTR)rdir->wNameOrdinal, (LPSTR)NTRT_ICON);
    7274
     
    7779        }
    7880
    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        iconhdr = (WINBITMAPINFOHEADER *)LockResource(LoadResource(hInstance, hRes));
     82        os2icon = ConvertIcon(iconhdr, SizeofResource(hInstance, hRes), &os2iconsize, (int)bafh - (int)orgbafh + sizeof(BITMAPARRAYFILEHEADER2)-sizeof(BITMAPFILEHEADER2));
    8183
    8284        if(os2icon == NULL) {
     
    98100        rdir++;
    99101  }
     102  *ressize = groupsize;
    100103  return (void *)orgbafh;
    101104}
  • trunk/src/kernel32/kernel32.mak

    r6417 r6482  
    1 # $Id: kernel32.mak,v 1.11 2001-07-30 18:15:09 sandervl Exp $
     1# $Id: kernel32.mak,v 1.12 2001-08-07 21:34:16 sandervl Exp $
    22
    33#
     
    132132$(OBJDIR)\hmdisk.obj \
    133133$(OBJDIR)\version.obj \
     134$(OBJDIR)\cvticon.obj \
     135$(OBJDIR)\cvticongrp.obj \
     136$(OBJDIR)\winres.obj \
    134137!ifdef DEBUG
    135138$(OBJDIR)\exceptstackdump.obj \
  • trunk/src/kernel32/kernel32lib.mak

    r6438 r6482  
    1 # $Id: kernel32lib.mak,v 1.3 2001-08-02 14:50:13 sandervl Exp $
     1# $Id: kernel32lib.mak,v 1.4 2001-08-07 21:34:16 sandervl Exp $
    22
    33#
     
    119119$(OBJDIR)\hmdisk.obj \
    120120$(OBJDIR)\version.obj \
     121$(OBJDIR)\cvticon.obj \
     122$(OBJDIR)\cvticongrp.obj \
     123$(OBJDIR)\winres.obj \
    121124!ifdef DEBUG
    122125$(OBJDIR)\exceptstackdump.obj \
  • trunk/src/kernel32/winres.cpp

    r5308 r6482  
    1 /* $Id: winres.cpp,v 1.29 2001-03-13 18:45:34 sandervl Exp $ */
     1/* $Id: winres.cpp,v 1.30 2001-08-07 21:34:16 sandervl Exp $ */
    22
    33/*
     
    3535#include "dbglocal.h"
    3636
     37#if 0
    3738//******************************************************************************
    3839//******************************************************************************
     
    9495  free(lpResource);
    9596}
     97#endif
    9698//******************************************************************************
    9799//******************************************************************************
     
    113115
    114116  switch((int)restype) {
    115     case NTRT_CURSOR:
    116         return QueryConvertedCursorSize((CursorComponent *)resdata, ressize);
     117    case NTRT_ICON:
     118        return QueryConvertedIconSize((WINBITMAPINFOHEADER *)resdata, ressize);
     119
     120//    case NTRT_CURSOR:
     121//      return QueryConvertedCursorSize((CursorComponent *)resdata, ressize);
    117122
    118123    case NTRT_GROUP_ICON:
Note: See TracChangeset for help on using the changeset viewer.