SetText method


Available for Window, MDIWindow, DialogBox, Static, Edit, Group, Button, Check, Radio and Picture objects.

Prototype

SetText Proto hWnd:HWND, lpszText:LPSTR

Syntax

Invoke SetText, hWnd, lpszText

Function

Sets the Text property of an object.

Parameters

hWnd

Handle to the object.

lpszText

Pointer to the effective address of a null-terminated string with the new text.

Return value

Eax returns TRUE if succesful, or FALSE if not.

NOTE: The lpszText parameter can be NULL for no text.


REMARKS: The SetText method expects lpszText to be a Unicode string if the application is running as Unicode, or an ANSI string if not (see the IsAppUnicode method). You can call SetTextA to set ANSI text in Unicode applications, or SetTextW to set Unicode text in ANSI applications.