GetCurrentObject function (wingdi.h)
The GetCurrentObject function retrieves a handle to an object of the specified type that has been selected into the specified device context (DC).
Syntax
HGDIOBJ GetCurrentObject(
[in] HDC hdc,
[in] UINT type
);
Parameters
[in] hdc
A handle to the DC.
[in] type
The object type to be queried. This parameter can be one of the following values.
Return value
If the function succeeds, the return value is a handle to the specified object.
If the function fails, the return value is NULL.
Remarks
An application can use the GetCurrentObject and GetObject functions to retrieve descriptions of the graphic objects currently selected into the specified DC.
Examples
For an example, see Retrieving Graphic-Object Attributes and Selecting New Graphic Objects.
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 | wingdi.h (include Windows.h) |
Library | Gdi32.lib |
DLL | Gdi32.dll |