CGdiObject::FromHandle

Returns a pointer to a CGdiObject object given a handle to a Windows GDI object.

static CGdiObject* PASCAL FromHandle( 
   HGDIOBJ hObject  
);

Parameters

  • hObject
    A HANDLE to a Windows GDI object.

Return Value

A pointer to a CGdiObject that may be temporary or permanent.

Remarks

If a CGdiObject object is not already attached to the Windows GDI object, a temporary CGdiObject object is created and attached.

This temporary CGdiObject object is only valid until the next time the application has idle time in its event loop, at which time all temporary graphic objects are deleted. Another way of saying this is that the temporary object is only valid during the processing of one window message.

Requirements

Header: afxwin.h

See Also

Reference

CGdiObject Class

Hierarchy Chart

CGdiObject::DeleteTempMap