Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
Windows Controls
Control Library
List View
Macros
 ListView_SetCheckState Macro

  Switch on low bandwidth view
ListView_SetCheckState Macro

Selects or deselects an item in a list-view control. You can use this macro or send the LVM_SETITEMSTATE message explicitly.

Syntax

ListView_SetCheckState(

    HWND hwndLV,     UINT iIndex,     BOOL fCheck );

Parameters

hwndLV
A handle to a list-view control.
iIndex
The index of the item for which to set the check state.
fCheck
A value that is set to TRUE to select the item, or FALSE to deselect it.

Return Value

Remarks

This macro should only be used for list-view controls with the LVS_EX_CHECKBOXES style. Although the LVM_SETITEMSTATE message used by ListView_SetCheckState is found on Microsoft Windows 95 and later systems, the LVS_EX_CHECKBOXES style was not introduced until version 4.70 of the common controls.

Macro Information

Minimum DLL Versioncomctl32.dll version 4.70 or later
Headercommctrl.h
Minimum operating systems Windows 2000, Windows NT 4.0 with Internet Explorer 3.0, Windows 98, Windows 95 with Internet Explorer 3.0

See Also

ListView_SetItemState
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker