Changeset 4524 for trunk/src/user32/win32wbase.cpp
- Timestamp:
- Oct 23, 2000, 8:28:53 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbase.cpp
r4515 r4524 1 /* $Id: win32wbase.cpp,v 1.2 19 2000-10-22 16:07:48sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.220 2000-10-23 18:28:53 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 3064 3064 } 3065 3065 //****************************************************************************** 3066 //When using this API for a window that was created by a different process, NT 3067 //does NOT send WM_GETTEXTLENGTH. 3066 3068 //****************************************************************************** 3067 3069 int Win32BaseWindow::GetWindowTextLength() 3068 3070 { 3069 return SendInternalMessageA(WM_GETTEXTLENGTH,0,0); 3070 } 3071 //****************************************************************************** 3071 //if the destination window is created by this process, send message 3072 if(dwProcessId == currentProcessId) { 3073 return SendInternalMessageA(WM_GETTEXTLENGTH,0,0); 3074 } 3075 //else get data directory from window structure 3076 return wndNameLength; 3077 } 3078 //****************************************************************************** 3079 //When using this API for a window that was created by a different process, NT 3080 //does NOT send WM_GETTEXT. 3072 3081 //****************************************************************************** 3073 3082 int Win32BaseWindow::GetWindowTextA(LPSTR lpsz, int cch) 3074 3083 { 3075 return SendInternalMessageA(WM_GETTEXT,(WPARAM)cch,(LPARAM)lpsz); 3076 } 3077 //****************************************************************************** 3084 //if the destination window is created by this process, send message 3085 if(dwProcessId == currentProcessId) { 3086 return SendInternalMessageA(WM_GETTEXT,(WPARAM)cch,(LPARAM)lpsz); 3087 } 3088 //else get data directory from window structure 3089 if (!lpsz || !cch) return 0; 3090 if (!windowNameA) lpsz[0] = 0; 3091 else lstrcpynA(lpsz, windowNameA, cch); 3092 return min(wndNameLength, cch); 3093 } 3094 //****************************************************************************** 3095 //When using this API for a window that was created by a different process, NT 3096 //does NOT send WM_GETTEXT. 3078 3097 //****************************************************************************** 3079 3098 int Win32BaseWindow::GetWindowTextW(LPWSTR lpsz, int cch) 3080 3099 { 3081 return SendInternalMessageW(WM_GETTEXT,(WPARAM)cch,(LPARAM)lpsz); 3082 } 3083 //****************************************************************************** 3100 //if the destination window is created by this process, send message 3101 if(dwProcessId == currentProcessId) { 3102 return SendInternalMessageW(WM_GETTEXT,(WPARAM)cch,(LPARAM)lpsz); 3103 } 3104 //else get data directory from window structure 3105 if (!lpsz || !cch) return 0; 3106 if (!windowNameW) lpsz[0] = 0; 3107 else lstrcpynW(lpsz, windowNameW, cch); 3108 return min(wndNameLength, cch); 3109 } 3110 //****************************************************************************** 3111 //TODO: How does this work when the target window belongs to a different process??? 3084 3112 //****************************************************************************** 3085 3113 BOOL Win32BaseWindow::SetWindowTextA(LPSTR lpsz)
Note:
See TracChangeset
for help on using the changeset viewer.