SelectObject

E724263

SelectObject is a Windows GDI function used to select a graphics object, such as a pen, brush, or bitmap, into a device context for subsequent drawing operations.

Jump to: Statements Referenced by

Statements (42)

Predicate Object
instanceOf Win32 API function
Windows GDI function
belongsToFamily GDI object management functions
callingConvention stdcall
canSelect bitmap
brush
font
palette
pen
region
category graphics programming API
definedIn wingdi.h
documentationURL https://learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-selectobject
effect associates GDI object with device context
replaces previously selected object of same type
errorHandling GetLastError can be used after failure
exportedBy gdi32.dll
hasPurpose select a graphics object into a device context
introducedIn early versions of Microsoft Windows
operatesOn device context
graphics object
parameterType HDC
HGDIOBJ
partOf Windows GDI NERFINISHED
platform Win32 NERFINISHED
relatedFunction CreateBrushIndirect NERFINISHED
CreateCompatibleBitmap
CreatePen
DeleteObject
GetObject
requires valid GDI object handle
valid device context handle
returns HGDIOBJ
handle to previously selected object
returnsOnFailure HGDI_ERROR
NULL
runsOn Microsoft Windows NERFINISHED
sideEffect previously selected object must be restored before deletion
threadingModel must be called from thread that owns the HDC
usedFor subsequent drawing operations
usedIn GDI-based rendering code
Win32 desktop applications

Referenced by (1)

Full triples — surface form annotated when it differs from this entity's canonical label.

Gdi32 exportsFunction SelectObject