GetPropA function (winuser.h)

Retrieves a data handle from the property list of the specified window. The character string identifies the handle to be retrieved. The string and handle must have been added to the property list by a previous call to the SetProp function.

Syntax

HANDLE GetPropA(
  [in] HWND   hWnd,
  [in] LPCSTR lpString
);

Parameters

[in] hWnd

Type: HWND

A handle to the window whose property list is to be searched.

[in] lpString

Type: LPCTSTR

An atom that identifies a string. If this parameter is an atom, it must have been created by using the GlobalAddAtom function. The atom, a 16-bit value, must be placed in the low-order word of the lpString parameter; the high-order word must be zero.

Return value

Type: HANDLE

If the property list contains the string, the return value is the associated data handle. Otherwise, the return value is NULL.

Remarks

Note

The winuser.h header defines GetProp as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winuser.h (include Windows.h)
Library User32.lib
DLL User32.dll
API set ext-ms-win-ntuser-window-l1-1-0 (introduced in Windows 8)

See also

Conceptual

GlobalAddAtom

Reference

SetProp

Window Properties

ITaskbarList2::MarkFullscreenWindow