Partager via


CGdiObject::GetSafeHandle

Returns m_hObject unless this is NULL, in which case NULL is returned.

HGDIOBJ GetSafeHandle( ) const;

Return Value

A HANDLE to the attached Windows GDI object; otherwise NULL if no object is attached.

Remarks

This is part of the general handle interface paradigm and is useful when NULL is a valid or special value for a handle.

Example

See the example for CWnd::IsWindowEnabled.

Requirements

Header: afxwin.h

See Also

Reference

CGdiObject Class

Hierarchy Chart