GweBypassCoredllThunk_t::GetWindowTextW_I (Windows Embedded CE 6.0)
1/6/2010
This method copies the text of the title bar of the specified window — if it has one — into a buffer. If the specified window is a control, the text of the control is copied.
Syntax
static INT WINAPI GetWindowTextW_I(
HWND hwndThis,
LPTSTR psz,
int cchMax
);
Parameters
- hwndThis
[in] Handle to the window or control containing the text.
- psz
[out] Long pointer to the buffer that will receive the text.
- cchMax
[in] Integer that specifies the maximum number of characters to copy to the buffer, including the NULL character. If the text exceeds this limit, it is truncated.
Return Value
The length, in characters, of the copied string, not including the terminating null character, indicates success. Zero indicates that the window has no title bar or text, if the title bar is empty, or if the window or control handle is invalid. To get extended error information, call GetLastError.
This function cannot retrieve the text of an edit control in another application.
Remarks
This method is an internal version of the GetWindowText function.
If the target window is owned by the current process, GweBypassCoredllThunk_t::GetWindowTextW_I causes a WM_GETTEXT message to be sent to the specified window or control. If the target window is owned by another process and has a title bar, GweBypassCoredllThunk_t::GetWindowTextW_I retrieves the text of the title bar. If the window does not have a title bar, the return value is a null string.
Requirements
Header | gwebypasscoredllthunk.hpp |
Windows Embedded CE | Windows CE .NET 4.0 and later |
See Also
Reference
GweBypassCoredllThunk_t
GetWindowText
GweBypassCoredllThunk_t::GetWindowTextLengthW_I
GweBypassCoredllThunk_t::SetWindowTextW_I
WM_GETTEXT