Export (0) Print
Expand All

EnumObjects function

The EnumObjects function enumerates the pens or brushes available for the specified device context (DC). This function calls the application-defined callback function once for each available object, supplying data describing that object. EnumObjects continues calling the callback function until the callback function returns zero or until all of the objects have been enumerated.

Syntax


int EnumObjects(
  _In_  HDC          hdc,
  _In_  int          nObjectType,
  _In_  GOBJENUMPROC lpObjectFunc,
  _In_  LPARAM       lParam
);

Parameters

hdc [in]

A handle to the DC.

nObjectType [in]

The object type. This parameter can be OBJ_BRUSH or OBJ_PEN.

lpObjectFunc [in]

A pointer to the application-defined callback function. For more information about the callback function, see the EnumObjectsProc function.

lParam [in]

A pointer to the application-defined data. The data is passed to the callback function along with the object information.

Return value

If the function succeeds, the return value is the last value returned by the callback function. Its meaning is user-defined.

If the objects cannot be enumerated (for example, there are too many objects), the function returns zero without calling the callback function.

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
EnumObjectsProc
GetObject

 

 

Community Additions

ADD
Show:
© 2015 Microsoft