Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 1.89 KB

FindWindow.md

File metadata and controls

55 lines (41 loc) · 1.89 KB

Home

Function name : FindWindow

Group: Window - Library: user32


Retrieves a handle to the top-level window whose class name and window name match the specified strings.


Code examples:

How to activate Windows Calculator
Simple Window Viewer
Setting properties of the window: caption and user-defined value
How to start the screen saver and how to find whether the screen saver is active
Confining Windows calculator inside the VFP main window
Scanning the hierarchy of child windows down from the main VFP window
How to block the ALT+TAB shortcut (WinXP)
Accessing Adobe Reader 7.0 main menu from VFP application
Obtaining names and positions for shortcuts located on the Windows Desktop
Moving shortcut to a specified position on the Windows Desktop

Declaration:

HWND FindWindow(
  LPCTSTR lpClassName,  // class name
  LPCTSTR lpWindowName  // window name
);  

FoxPro declaration:

DECLARE INTEGER FindWindow IN user32;
	STRING lpClassName,;
	STRING lpWindowName  

Parameters:

lpClassName [in] Pointer to a null-terminated string that specifies the class name.

lpWindowName [in] Pointer to a null-terminated string that specifies the window name (the window"s title).


Return value:

If the function succeeds, the return value is a handle to the window that has the specified class name and window name. If the function fails, the return value is NULL.