Ignore:
Timestamp:
Apr 16, 2000, 8:26:59 PM (25 years ago)
Author:
cbratschi
Message:

new listview messages and styles, new resources

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/CCBase.cpp

    r3369 r3409  
    1 /* $Id: CCBase.cpp,v 1.7 2000-04-12 16:38:58 cbratschi Exp $ */
     1/* $Id: CCBase.cpp,v 1.8 2000-04-16 18:26:55 cbratschi Exp $ */
    22/*
    33 * COMCTL32 Base Functions and Macros for all Controls
     
    346346}
    347347
     348//NOTE for lstrcmpni*: both buffers must be at least shortLen+1 characters long!
     349
     350INT lstrcmpniA(CHAR *textA,CHAR *textB,INT len)
     351{
     352  CHAR tmp1,tmp2;
     353  INT res;
     354
     355  tmp1 = textA[len];
     356  textA[len] = 0;
     357  tmp2 = textB[len];
     358  textB[len] = 0;
     359
     360  res = lstrcmpiA(textA,textB);
     361
     362  textA[len] = tmp1;
     363  textB[len] = tmp2;
     364  return res;
     365}
     366
     367INT lstrcmpniAtoW(CHAR *textA,WCHAR* textB,INT len)
     368{
     369  WCHAR *tmp;
     370  INT res;
     371
     372  tmp = (WCHAR*)COMCTL32_Alloc((len+1)*sizeof(WCHAR));
     373  lstrcpynAtoW(tmp,textA,len+1);
     374
     375  res = lstrcmpniW(tmp,textB,len);
     376
     377  COMCTL32_Free(tmp);
     378  return res;
     379}
     380
     381
     382INT lstrcmpniW(WCHAR *textA,WCHAR *textB,INT len)
     383{
     384  WCHAR tmp1,tmp2;
     385  INT res;
     386
     387  tmp1 = textA[len];
     388  textA[len] = 0;
     389  tmp2 = textB[len];
     390  textB[len] = 0;
     391
     392  res = lstrcmpiW(textA,textB);
     393
     394  textA[len] = tmp1;
     395  textB[len] = tmp2;
     396  return res;
     397}
     398
     399INT lstrcmpniAW(WCHAR *textA,BOOL unicodeA,WCHAR *textB,BOOL unicodeB,INT len)
     400{
     401  if (unicodeA)
     402  {
     403    if (unicodeB)
     404    {
     405      return lstrcmpniW(textA,textB,len);
     406    } else
     407    {
     408      return lstrcmpniAtoW((LPSTR)textB,textA,len);
     409    }
     410  } else
     411  {
     412    if (unicodeB)
     413    {
     414      return lstrcmpniAtoW((LPSTR)textA,textB,len);
     415    } else
     416    {
     417      return lstrcmpniA((LPSTR)textA,(LPSTR)textB,len);
     418    }
     419  }
     420}
     421
    348422CHAR* lstrstrA(CHAR *text,CHAR *subtext)
    349423{
Note: See TracChangeset for help on using the changeset viewer.