ListView_SetBkImage macro (commctrl.h)

Sets the background image in a list-view control. You can use this macro or send the LVM_SETBKIMAGE message explicitly.

Syntax

BOOL ListView_SetBkImage(
   HWND        hwnd,
   LPLVBKIMAGE plvbki
);

Parameters

hwnd

Type: HWND

A handle to the list-view control.

plvbki

Type: LPLVBKIMAGE

A pointer to an LVBKIMAGE structure that contains the new background image information.

Return value

Type: BOOL

Returns nonzero if successful, or zero otherwise. Returns zero if the ulFlags member of the LVBKIMAGE structure is LVBKIF_SOURCE_NONE.

Remarks

Because the list-view control uses OLE COM to manipulate the background images, the calling application must call CoInitialize or OleInitialize before using this macro. It is best to call one of these functions when the application is initialized and call either CoUninitialize or OleUninitialize when the application is terminating.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commctrl.h

See also

ListView_GetBkImage