Print method


Available for Window, DialogBox and Picture objects.

Prototype

Print Proto hWnd:HWND, lpszText:LPSTR

Syntax

Invoke Print, hWnd, lpszText

Function

Prints text inside the object's client area.

Parameters

hWnd

Handle to the object.

lpszText

Pointer to the effective address of the null-terminated string to print.

Return value

Eax returns TRUE if successful, or FALSE if not.


NOTE: This method uses the coordinates set by
SetCurrentX and SetCurrentY methods as the starting point for drawing the text.

REMARKS: The Print 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 PrintA to print ANSI strings in Unicode applications, or PrintW to print Unicode strings in ANSI applications.

IMPORTANT: For Picture objects, you can also call the SetText method, although Print method is faster as it does not update the object's text.