Skip to content

Latest commit

 

History

History
74 lines (56 loc) · 2.73 KB

File metadata and controls

74 lines (56 loc) · 2.73 KB

Home

Function name : GetWindowText

Group: Window - Library: user32


The GetWindowText function copies the text of the specified window"s title bar (if it has one) into a buffer


Code examples:

Listing child windows for the Windows desktop
Who owns the Windows Clipboard
Who is the first in viewing the Clipboard
Scanning a hierarchy of child windows down from the Windows Desktop
Obtaining window class name for the main VFP window
Simple Window Viewer
Retrieving top-child window for the VFP form
Terminating all running applications from a VFP program
Minimizing all running applications
Scanning the hierarchy of child windows down from the main VFP window
The window and its ancestors
Reading the structure of VFP main menu
Retrieveing information about the active window (even if it is not owned by the calling process)
Extended MessageBox Class
How to change the name and the size of the font in the MessageBox dialog
How to position the GETPRINTER() dialog
Accessing Adobe Reader 7.0 main menu from VFP application
How to control Adobe Reader 9.0 (SDI mode) from VFP application

Declaration:

int GetWindowText(
    HWND  hWnd,	// handle of window or control with text
    LPTSTR  lpString,	// address of buffer for text
    int  nMaxCount 	// maximum number of characters to copy
   );  

FoxPro declaration:

DECLARE INTEGER GetWindowText IN user32;
	INTEGER hwnd,;
	STRING @lpString,;
	INTEGER cch  

Parameters:

hWnd Identifies the window or control containing the text.

lpString Points to the buffer that will receive the text.

nMaxCount Specifies the maximum number of characters to copy to the buffer. If the text exceeds this limit, it is truncated


Return value:

If the function succeeds, the return value is the length, in characters, of the copied string


Comments:

Read this: The secret life of GetWindowText on The Old New Thing.