Ignore:
Timestamp:
Dec 30, 1999, 7:33:00 PM (26 years ago)
Author:
cbratschi
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32wbase.cpp

    r2266 r2269  
    1 /* $Id: win32wbase.cpp,v 1.128 1999-12-30 11:21:00 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.129 1999-12-30 18:32:59 cbratschi Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    28752875BOOL Win32BaseWindow::hasWindowName(LPSTR wndname, BOOL fUnicode)
    28762876{
    2877     if(wndname == NULL)
    2878       return FALSE;
    2879 
    2880     if(fUnicode) {
    2881             return (lstrcmpW(windowNameW, (LPWSTR)wndname) == 0);
    2882     }
    2883     else    return (strcmp(windowNameA, wndname) == 0);
     2877    INT len = GetWindowTextLength();
     2878    BOOL res;
     2879
     2880    if (wndname == NULL)
     2881      return (len == 0);
     2882
     2883    len++;
     2884    if (fUnicode)
     2885    {
     2886      WCHAR *text = (WCHAR*)malloc(len*sizeof(WCHAR));
     2887
     2888      GetWindowTextW(text,len);
     2889      res = (lstrcmpW(text,(LPWSTR)wndname) == 0);
     2890      free(text);
     2891    } else
     2892    {
     2893      CHAR *text = (CHAR*)malloc(len*sizeof(CHAR));
     2894
     2895      GetWindowTextA(text,len);
     2896      res = (strcmp(text,wndname) == 0);
     2897      free(text);
     2898    }
     2899
     2900    return res;
    28842901}
    28852902//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.