Changeset 2269 for trunk/src/user32/win32wbase.cpp
- Timestamp:
- Dec 30, 1999, 7:33:00 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbase.cpp
r2266 r2269 1 /* $Id: win32wbase.cpp,v 1.12 8 1999-12-30 11:21:00 sandervlExp $ */1 /* $Id: win32wbase.cpp,v 1.129 1999-12-30 18:32:59 cbratschi Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 2875 2875 BOOL Win32BaseWindow::hasWindowName(LPSTR wndname, BOOL fUnicode) 2876 2876 { 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; 2884 2901 } 2885 2902 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.