Skip to content

Latest commit

 

History

History
89 lines (67 loc) · 3.94 KB

GetWindowLong.md

File metadata and controls

89 lines (67 loc) · 3.94 KB

Home

Function name : GetWindowLong

Group: Window Class - Library: user32


Retrieves information about the specified window. The function also retrieves the 32-bit (long) value at the specified offset into the extra window memory.


Code examples:

How to view icons stored in executable files (Icon Viewer) - II
System Image List Viewer
Creating irregularly shaped FoxPro form using transparency color key
Retrieving information about the main VFP window
Setting properties of the window: caption and user-defined value
Displaying icons in the system tray (VFP9)
Placing a button on the VFP form as a new child window
Switching between keyboard layouts
Using Common Controls: the Header Control
Locking the workstation
Dragging files from Explorer window and dropping them on FoxPro control (requires VFP9)
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP form
Extended MessageBox Class
Semi-transparent Form
How to disable the Windows Clipboard (VFP9)
How to block the PrintScreen key
Transparent Menu Class (requires VFP9)
Adding user-defined items to the Control Menu of VFP form (requires VFP9)
How to hot-track menu item selection in top-level form (requires VFP9)
How to make a VFP form fading out when released (GDI+ version)
How to make a VFP form fading out when released (GDI version)
Displaying the associated icons and descriptions for files and folders
Using WM_COPYDATA for interprocess communication (VFP9)
Displaying hypertext links with the SysLink control (VFP9, Comctl32.dll)
Using Month Calendar Control (VFP9, Comctl32.dll)
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Detecting changes in connections to removable drives (VFP9)
Customizing the frame of top-level form: removing the standard frame (VFP9, Vista)
Windows Shell Icons displayed and exported to ICO files (Vista)
Browsing Windows Known Folders (Special Folders)
Displaying dimmed window behind VFP top-level form
Monitoring clipboard content changes (VFP9)

Declaration:

LONG GetWindowLong(
  HWND hWnd,  // handle to window
  int nIndex  // offset of value to retrieve
);  

FoxPro declaration:

DECLARE INTEGER GetWindowLong IN user32;
	INTEGER hWnd, INTEGER nIndex
  

Parameters:

hWnd [in] Handle to the window and, indirectly, the class to which the window belongs.

nIndex [in] Specifies the zero-based offset to the value to be retrieved.


Return value:

If the function succeeds, the return value is the requested 32-bit value. If the function fails, the return value is zero.


Comments:

This function, as well as GetModuleHandle, retrieves a handle to the application instance; but not only.

See also: SetWindowLong.