Ignore:
Timestamp:
Jun 26, 2000, 9:35:56 AM (25 years ago)
Author:
sandervl
Message:

resource type numeric string fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/winimgres.cpp

    r3720 r3753  
    1 /* $Id: winimgres.cpp,v 1.40 2000-06-17 09:03:37 sandervl Exp $ */
     1/* $Id: winimgres.cpp,v 1.41 2000-06-26 07:35:56 sandervl Exp $ */
    22
    33/*
     
    6565    return NULL;
    6666
     67  if(HIWORD(type)) {
     68        char *lpszName = (char *)type;
     69        //"#102" really means numeric id 102
     70        if(lpszName[0] == '#') {
     71                type = atoi(&lpszName[1]);
     72        }
     73  }
     74
    6775  if(HIWORD(id) && id != IDLANG_GETFIRST) {
    6876        char *lpszName = (char *)id;
     
    308316{
    309317 PIMAGE_RESOURCE_DATA_ENTRY      pData = NULL;
    310  BOOL   fNumType;
    311318 char  *winres = NULL;
    312319 ULONG  id, type, lang;
    313320 int    i, j, error;
    314321
    315     fNumType = TRUE;    //assume numeric
     322#ifdef DEBUG
    316323    if(HIWORD(lpszType) != 0) {//string id?
    317324        for(i=0;i<MAX_RES;i++) {
     
    319326                    break;
    320327        }
    321 //TODO:
    322 #if 0
    323         if(stricmp((char *)lpszType, BITMAP_TYPENAME2) == 0) {
    324             i = (int)RT_BITMAPA;
    325         }
     328        if(i == MAX_RES) {//custom resource type
     329            type = (ULONG)lpszType;
     330        }
     331        else type = i;
     332    }
     333    else  type = (ULONG)lpszType;
     334#else
     335    type = (ULONG)lpszType;
    326336#endif
    327         if(i == MAX_RES) {//custom resource type
    328             fNumType = FALSE;
    329             type = (ULONG)lpszType;
    330         }
    331         else type = i;
    332     }
    333     else  type = (ULONG)lpszType;
    334337
    335338    switch(langid) {
Note: See TracChangeset for help on using the changeset viewer.