CODImageComponent::Load

Loads the image component.

Defined in: OdImageComp.cpp

Syntax

BOOL CODImageComponent::Load(UINT nID, CDC* pDC, const BOOL bTransparent, const COLORREF transColor);

BOOL CODImageComponent::Load(UINT nID, const BOOL bTransparent, const COLORREF transColor);

BOOL CODImageComponent::Load(CString strImagePath, const BOOL bTransparent, const COLORREF transColor);

BOOL CODImageComponent::Load(CBitmap& bmp, const BOOL bTransparent, const COLORREF transColor);

BOOL CODImageComponent::Load(SECDib& dib, const BOOL bTransparent, const COLORREF transColor);

Return Value

Non-zero if the component was successfully created.

Parameters

nID

The resource ID of a bitmap.

pDC

The device context for the bitmap.

strImagePath

The path of the file to read the image from.

bTransparent

Indicates if image is to be transparent.

transColor

Transparent color.

Comments

This function loads the image component from either a bitmap resource, bitmap file, or a bitmap object. This function can be used repeatedly on the same image component, so different bitmaps can be loaded at run-time.

NOTE: The version of this function that takes a pointer to a CDC object as a parameter is obsolete, and is only included for backward compatibility.