GetObjectType function

The GetObjectType retrieves the type of the specified object.

Syntax


DWORD GetObjectType(
  _In_ HGDIOBJ h
);

Parameters

h [in]

A handle to the graphics object.

Return value

If the function succeeds, the return value identifies the object. This value can be one of the following.

ValueMeaning
OBJ_BITMAPBitmap
OBJ_BRUSHBrush
OBJ_COLORSPACEColor space
OBJ_DCDevice context
OBJ_ENHMETADCEnhanced metafile DC
OBJ_ENHMETAFILEEnhanced metafile
OBJ_EXTPENExtended pen
OBJ_FONTFont
OBJ_MEMDCMemory DC
OBJ_METAFILEMetafile
OBJ_METADCMetafile DC
OBJ_PALPalette
OBJ_PENPen
OBJ_REGIONRegion

 

If the function fails, the return value is zero.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Device Contexts Overview
Device Context Functions
GetObject
SelectObject

 

 

Show: