HGDIOBJ GetCurrentObject(hdc, uObjectType) | |||
HDC hdc; | |||
UINT uObjectType; |
The GetCurrentObject function returns the currently selected object of the specified type.
hdc
Identifies the device context.
uObjectType
Specifies the object type to be queried.
Value | Meaning |
OBJ_PEN | Returns the current selected pen |
OBJ_BRUSH | Returns the current selected brush |
OBJ_PAL | Returns the current selected pal |
OBJ_FONT | Returns the current selected font |
OBJ_BITMAP | Returns the current selected bitmap if hdc is a memory DC |
The return value is the handle of the current selected object of the specified type. It is zero if an error occurs.
GetCurrentObject can be used to query the current state of a DC when combined with GetObject.
SelectObject GetObject