IImageList2::DiscardImages method (commoncontrols.h)

Discards images from list, as specified.

Syntax

HRESULT DiscardImages(
  [in] int   iFirstImage,
  [in] int   iLastImage,
  [in] DWORD dwFlags
);

Parameters

[in] iFirstImage

Type: int

An index of first image to discard.

[in] iLastImage

Type: int

An index of last image to discard.

[in] dwFlags

Type: DWORD

Discard images flags. ILDI_STANDBY and ILDI_PURGE are mutually exclusive. ILDI_RESETACCESS can be combined with either. One or more of the following are valid.

Value Meaning
ILDI_PURGE
0x00000001
Discard and purge.
ILDI_STANDBY
0x00000002
Discard to standby list.
ILDI_RESETACCESS
0x00000004
Reset the "has been accessed" flag.
ILDI_QUERYACCESS
0x00000008
Ask whether access flag is set (but do not reset).

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header commoncontrols.h
DLL Comctl32.dll (version 6.0 or later)