CODImageEntry Class

class CODImageEntry: public CObject, public IRefCount

A container for an image object that is stored in cache. Provides reference counting for the image. Also saves the resource ID or filename used to load the image for the purpose of doing lookups in the cache.

Defined in: OdImageCache.h

Class Members

VIEWS_API CODImageEntry()

Constructor

VIEWS_API ~CODImageEntry()

Destructor

VIEWS_API BOOL LoadImage(UINT nID)

Load the image from a resource.

VIEWS_API BOOL LoadImage(LPCTSTR lpszFileName)

Load the image from a file.

VIEWS_API BOOL LoadImage(CBitmap& pBitmap, CDC* pDC=NULL)

Load an image from a bitmap object.

VIEWS_API BOOL LoadIcon(UINT nID, const COLORREF crFill = RGB(255,255,255))

Load the image from an icon resource.

VIEWS_API BOOL LoadIcon(LPCTSTR lpszFileName, const COLORREF crFill = RGB(255,255,255))

Load the image from an icon file.

VIEWS_API BOOL FillIcon(const COLORREF crFill = RGB(255,255,255))

Fill transparent areas of the icon with the given fill color.

VIEWS_API BOOL operator==(const CODImageEntry &src)

Compare two image entries for equality.

VIEWS_API int GetRefCount() const

Return reference count.

VIEWS_API sfl::SECImage* GetImage()

Get a pointer to the image.

VIEWS_API CODDib* GetDib()

Get a pointer to the image.

VIEWS_API void Serialize(CArchive& ar)

Save and restore image entry.

inline ULONG STDMETHODCALLTYPE AddRef()

Add a reference to this object.

inline ULONG STDMETHODCALLTYPE Release()

Release a reference to this object.

CODDib m_image

The CODDib object which comprises the actual image.

UINT m_nID

Resource ID of image (if applicable).

CString m_szFileName

Filename of image (if applicable).