ListView 操作

类别:VC语言 点击:0 评论:0 推荐:
List-View Control Reference

This section contains information about the programming elements used with list-view controls.

Overviews List-View Controls

A list-view control is a window that displays a collection of items; each item consists of an icon and a label.

Macros ListView_ApproximateViewRect

Calculates the approximate width and height required to display a given number of items. You can use this macro or send the LVM_APPROXIMATEVIEWRECT message explicitly.

ListView_Arrange

Arranges items in icon view. You can use this macro or send the LVM_ARRANGE message explicitly.

ListView_CancelEditLabel

Cancels an item text editing operation. You can use this macro or send the LVM_CANCELEDITLABEL message explicitly.

ListView_CreateDragImage

Creates a drag image list for the specified item. You can use this macro or send the LVM_CREATEDRAGIMAGE message explicitly.

ListView_DeleteAllItems

Removes all items from a list-view control. You can use this macro or send the LVM_DELETEALLITEMS message explicitly.

ListView_DeleteColumn

Removes a column from a list-view control. You can use this macro or send the LVM_DELETECOLUMN message explicitly.

ListView_DeleteItem

Removes an item from a list-view control. You can use this macro or send the LVM_DELETEITEM message explicitly.

ListView_EditLabel

Begins in-place editing of the specified list-view item's text. The message implicitly selects and focuses the specified item. You can use this macro or send the LVM_EDITLABEL message explicitly.

ListView_EnableGroupView

Enables or disables whether the items in a list-view control display as a group. You can use this macro or send the LVM_ENABLEGROUPVIEW message explicitly.

ListView_EnsureVisible

Ensures that a list-view item is either entirely or partially visible, scrolling the list-view control if necessary. You can use this macro or send the LVM_ENSUREVISIBLE message explicitly.

ListView_FindItem

Searches for a list-view item with the specified characteristics. You can use this macro or send the LVM_FINDITEM message explicitly.

ListView_GetBkColor

Retrieves the background color of a list-view control. You can use this macro or send the LVM_GETBKCOLOR message explicitly.

ListView_GetBkImage

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

ListView_GetCallbackMask

Retrieves the callback mask for a list-view control. You can use this macro or send the LVM_GETCALLBACKMASK message explicitly.

ListView_GetCheckState

Determines if an item in a list-view control is selected. This should be used only for list-view controls that have the LVS_EX_CHECKBOXES style.

ListView_GetColumn

Retrieves the attributes of a list-view control's column. You can use this macro or send the LVM_GETCOLUMN message explicitly.

ListView_GetColumnOrderArray

Retrieves the current left-to-right order of columns in a list-view control. You can use this macro or send the LVM_GETCOLUMNORDERARRAY message explicitly.

ListView_GetColumnWidth

Retrieves the width of a column in report or list view. You can use this macro or send the LVM_GETCOLUMNWIDTH message explicitly.

ListView_GetCountPerPage

Calculates the number of items that can fit vertically in the visible area of a list-view control when in list or report view. Only fully visible items are counted. You can use this macro or send the LVM_GETCOUNTPERPAGE message explicitly.

ListView_GetEditControl

Retrieves the handle to the edit control being used to edit a list-view item's text. You can use this macro or send the LVM_GETEDITCONTROL message explicitly.

ListView_GetExtendedListViewStyle

Retrieves the extended styles that are currently in use for a given list-view control. You can use this macro or send the LVM_GETEXTENDEDLISTVIEWSTYLE message explicitly.

ListView_GetGroupInfo

Retrieves group information. You can use this macro or send the LVM_GETGROUPINFO message explicitly.

ListView_GetGroupMetrics

Retrieves the metrics of a group. You can use this macro or send the LVM_GETGROUPMETRICS message explicitly.

ListView_GetHeader

Retrieves the handle to the header control used by a list-view control. You can use this macro or send the LVM_GETHEADER message explicitly.

ListView_GetHotCursor

Retrieves the HCURSOR used when the pointer is over an item while hot tracking is enabled. You can use this macro or send the LVM_GETHOTCURSOR message explicitly.

ListView_GetHotItem

Retrieves the index of the hot item. You can use this macro or send the LVM_GETHOTITEM message explicitly.

ListView_GetHoverTime

Retrieves the amount of time that the mouse cursor must hover over an item before it is selected. You can use this macro or send the LVM_GETHOVERTIME message explicitly.

ListView_GetImageList

Retrieves the handle to an image list used for drawing list-view items. You can use this macro or send the LVM_GETIMAGELIST message explicitly.

ListView_GetInsertMark

Retrieves the position of the insertion point. You can use this macro or send the LVM_GETINSERTMARK message explicitly.

ListView_GetInsertMarkColor

Retrieves the color of the insertion point. You can use this macro or send the LVM_GETINSERTMARKCOLOR message explicitly.

ListView_GetInsertMarkRect

Retrieves the rectangle that bounds the insertion point. You can use this macro or send the LVM_GETINSERTMARKRECT message explicitly.

ListView_GetISearchString

Retrieves the incremental search string of a list-view control. You can use this macro or send the LVM_GETISEARCHSTRING message explicitly.

ListView_GetItem

Retrieves some or all of a list-view item's attributes. You can use this macro or send the LVM_GETITEM message explicitly.

ListView_GetItemCount

Retrieves the number of items in a list-view control. You can use this macro or send the LVM_GETITEMCOUNT message explicitly.

ListView_GetItemPosition

Retrieves the position of a list-view item. You can use this macro or explicitly send the LVM_GETITEMPOSITION message.

ListView_GetItemRect

Retrieves the bounding rectangle for all or part of an item in the current view. You can use this macro or send the LVM_GETITEMRECT message explicitly.

ListView_GetItemSpacing

Determines the spacing between items in a list-view control. You can use this macro or send the LVM_GETITEMSPACING message explicitly.

ListView_GetItemState

Retrieves the state of a list-view item. You can use this macro or send the LVM_GETITEMSTATE message explicitly.

ListView_GetItemText

Retrieves the text of a list-view item or subitem. You can use this macro or send the LVM_GETITEMTEXT message explicitly.

ListView_GetNextItem

Searches for a list-view item that has the specified properties and bears the specified relationship to a specified item. You can use this macro or send the LVM_GETNEXTITEM message explicitly.

ListView_GetNumberOfWorkAreas

Retrieves the number of working areas in a list-view control. You can use this macro or send the LVM_GETNUMBEROFWORKAREAS message explicitly.

ListView_GetOrigin

Retrieves the current view origin for a list-view control. You can use this macro or send the LVM_GETORIGIN message explicitly.

ListView_GetOutlineColor

Retrieves the color of the border of a list-view control if the LVS_EX_BORDERSELECT extended window style is set. You can use this macro or send the LVM_GETOUTLINECOLOR message explicitly.

ListView_GetSelectedColumn

Retrieves an integer that specifies the selected column. You can use this macro or send the LVM_GETSELECTEDCOLUMN message explicitly.

ListView_GetSelectedCount

Determines the number of selected items in a list-view control. You can use this macro or send the LVM_GETSELECTEDCOUNT message explicitly.

ListView_GetSelectionMark

Retrieves the selection mark from a list-view control. You can use this macro or explicitly send the LVM_GETSELECTIONMARK message.

ListView_GetStringWidth

Determines the width of a specified string using the specified list-view control's current font. You can use this macro or send the LVM_GETSTRINGWIDTH message explicitly.

ListView_GetSubItemRect

Retrieves information about the rectangle that surrounds a subitem in a list-view control. You can use this macro (recommended) or send the LVM_GETSUBITEMRECT message explicitly. This macro is intended to be used only on list-view controls that use the LVS_REPORT style.

ListView_GetTextBkColor

Retrieves the text background color of a list-view control. You can use this macro or send the LVM_GETTEXTBKCOLOR message explicitly.

ListView_GetTextColor

Retrieves the text color of a list-view control. You can use this macro or send the LVM_GETTEXTCOLOR message explicitly.

ListView_GetTileInfo

Retrieves information about a tile in a list-view control. You can use this macro or send the LVM_GETTILEINFO message explicitly.

ListView_GetTileViewInfo

Retrieves information about a list-view control in tile view. You can use this macro or send the LVM_GETTILEVIEWINFO message explicitly.

ListView_GetToolTips

Retrieves the ToolTip control that the list-view control uses to display ToolTips. You can use this macro or send the LVM_GETTOOLTIPS message explicitly.

ListView_GetTopIndex

Retrieves the index of the topmost visible item when in list or report view. You can use this macro or send the LVM_GETTOPINDEX message explicitly.

ListView_GetUnicodeFormat

Retrieves the Unicode character format flag for the control. You can use this macro or send the LVM_GETUNICODEFORMAT message explicitly.

ListView_GetView

Retrieves the current view of a list-view control. You can use this macro or send the LVM_GETVIEW message explicitly.

ListView_GetViewRect

Retrieves the bounding rectangle of all items in the list-view control. The list view must be in icon or small icon view. You can use this macro or send the LVM_GETVIEWRECT message explicitly.

ListView_GetWorkAreas

Retrieves the working areas from a list-view control. You can use this macro, or send the LVM_GETWORKAREAS message explicitly.

ListView_HasGroup

Determines whether the list-view control has a specified group. You can use this macro or send the LVM_HASGROUP message explicitly.

ListView_HitTest

Determines which list-view item, if any, is at a specified position. You can use this macro or send the LVM_HITTEST message explicitly.

ListView_InsertColumn

Inserts a new column in a list-view control. You can use this macro or send the LVM_INSERTCOLUMN message explicitly.

ListView_InsertGroup

Inserts a group into a list-view control. You can use this macro or send the LVM_INSERTGROUP message explicitly.

ListView_InsertGroupSorted

Inserts a group into an ordered list of groups. You can use this macro or send the LVM_INSERTGROUPSORTED message explicitly.

ListView_InsertItem

Inserts a new item in a list-view control. You can use this macro or send the LVM_INSERTITEM message explicitly.

ListView_InsertMarkHitTest

Retrieves the insertion point closest to a specified point. You can use this macro or send the LVM_INSERTMARKHITTEST message explicitly.

ListView_IsGroupViewEnabled

Checks whether the list-view control has group view enabled. You can use this macro or send the LVM_ISGROUPVIEWENABLED message explicitly.

ListView_MapIDToIndex

Maps the identifier (ID) of an item to an index. You can use this macro or send the LVM_MAPIDTOINDEX message explicitly.

ListView_MapIndexToID

Maps the index of an item to a unique ID. You can use this macro or send the LVM_MAPINDEXTOID message explicitly.

ListView_MoveGroup

Moves the group to the specified zero based index. You can use this macro or send the LVM_MOVEGROUP message explicitly.

ListView_MoveItemToGroup

Moves an item specified by an index into a group. You can use this macro or send the LVM_MOVEITEMTOGROUP message explicitly.

ListView_RedrawItems

Forces a list-view control to redraw a range of items. You can use this macro or send the LVM_REDRAWITEMS message explicitly.

ListView_RemoveAllGroups

Removes all groups from a list-view control. You can use this macro or send the LVM_REMOVEALLGROUPS message explicitly.

ListView_RemoveGroup

Removes a group from a list-view control. You can use this macro or send the LVM_REMOVEGROUP message explicitly.

ListView_Scroll

Scrolls the content of a list-view control. You can use this macro or send the LVM_SCROLL message explicitly.

ListView_SetBkColor

Sets the background color of a list-view control. You can use this macro or send the LVM_SETBKCOLOR message explicitly.

ListView_SetBkImage

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

ListView_SetCallbackMask

Changes the callback mask for a list-view control. You can use this macro or send the LVM_SETCALLBACKMASK message explicitly.

ListView_SetCheckState

Used to select or deselect an item in a list-view control. You can use this macro or send the LVM_SETITEMSTATE message explicitly.

ListView_SetColumn

Sets the attributes of a list-view column. You can use this macro or send the LVM_SETCOLUMN message explicitly.

ListView_SetColumnOrderArray

Sets the left-to-right order of columns in a list-view control. You can use this macro or send the LVM_SETCOLUMNORDERARRAY message explicitly.

ListView_SetColumnWidth

Used to change the width of a column in report view or the width of all columns in list-view mode. You can use this macro or send the LVM_SETCOLUMNWIDTH message explicitly.

ListView_SetExtendedListViewStyle

Sets extended styles for list-view controls. You can use this macro or send the LVM_SETEXTENDEDLISTVIEWSTYLE message explicitly.

ListView_SetExtendedListViewStyleEx

Sets extended styles for list-view controls using the style mask. You can use this macro or send the LVM_SETEXTENDEDLISTVIEWSTYLE message explicitly.

ListView_SetGroupInfo

Sets group information. You can use this macro or send the LVM_SETGROUPINFO message explicitly.

ListView_SetGroupMetrics

Sets the metrics of a group. You can use this macro or send the LVM_SETGROUPMETRICS message explicitly.

ListView_SetHotCursor

Sets the HCURSOR that the list-view control uses when the pointer is over an item while hot tracking is enabled. You can use this macro or send the LVM_SETHOTCURSOR message explicitly. To check whether or not hot tracking is enabled, call SystemParametersInfo.

ListView_SetHotItem

Sets the hot item in a list-view control. You can use this macro or send the LVM_SETHOTITEM message explicitly.

ListView_SetHoverTime

Sets the amount of time that the mouse cursor must hover over an item before it is selected. You can use this macro or send the LVM_SETHOVERTIME message explicitly.

ListView_SetIconSpacing

Sets the spacing between icons in list-view controls set to the LVS_ICON style. You can use this macro or send the LVM_SETICONSPACING message explicitly.

ListView_SetImageList

Assigns an image list to a list-view control. You can use this macro or send the LVM_SETIMAGELIST message explicitly.

ListView_SetInfoTip

Sets tooltip text. You can use this macro or send the LVM_SETINFOTIP message explicitly.

ListView_SetInsertMark

Sets the insertion point to the defined position. You can use this macro or send the LVM_SETINSERTMARK message explicitly.

ListView_SetInsertMarkColor

Sets the color of the insertion point. You can use this macro or send the LVM_SETINSERTMARKCOLOR message explicitly.

ListView_SetItem

Sets some or all of a list-view item's attributes. You can also use ListView_SetItem to set the text of a subitem. You can use this macro or send the LVM_SETITEM message explicitly.

ListView_SetItemCount

Causes the list-view control to allocate memory for the specified number of items. You can use this macro or send the LVM_SETITEMCOUNT message explicitly.

ListView_SetItemCountEx

Sets the virtual number of items in a virtual list view. You can use this macro or send the LVM_SETITEMCOUNT message explicitly.

ListView_SetItemPosition

Moves an item to a specified position in a list-view control (in icon or small icon view). You can use this macro or send the LVM_SETITEMPOSITION message explicitly.

ListView_SetItemPosition32

Moves an item to a specified position in a list-view control (in icon or small icon view). This macro differs from the ListView_SetItemPosition macro in that it uses 32-bit coordinates. You can use the ListView_SetItemPosition32 macro or send the LVM_SETITEMPOSITION32 message explicitly.

ListView_SetItemState

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

ListView_SetItemText

Changes the text of a list-view item or subitem. You can use this macro or send the LVM_SETITEMTEXT message explicitly.

ListView_SetOutlineColor

Sets the color of the border of a list-view control if the LVS_EX_BORDERSELECT extended window style is set. You can use this macro or send the LVM_SETOUTLINECOLOR message explicitly.

ListView_SetSelectedColumn

Sets the index of the selected column. You can use this macro or send the LVM_SETSELECTEDCOLUMN message explicitly.

ListView_SetSelectionMark

Sets the selection mark in a list-view control. You can use this macro or send the LVM_SETSELECTIONMARK message explicitly.

ListView_SetTextBkColor

Sets the background color of text in a list-view control. You can use this macro or send the LVM_SETTEXTBKCOLOR message explicitly.

ListView_SetTextColor

Sets the text color of a list-view control. You can use this macro or send the LVM_SETTEXTCOLOR message explicitly.

ListView_SetTileInfo

Sets information for a tile of a list-view control. You can use this macro or send the LVM_SETTILEINFO message explicitly.

ListView_SetTileViewInfo

Sets information that a list-view control uses in tile view. You can use this macro or send the LVM_SETTILEVIEWINFO message explicitly.

ListView_SetTileWidth

Not currently supported.

ListView_SetToolTips

Sets the ToolTip control that the list-view control will use to display ToolTips. You can use this macro or send the LVM_SETTOOLTIPS message explicitly.

ListView_SetUnicodeFormat

Sets the Unicode character format flag for the control. This message allows you to change the character set used by the control at run time rather than having to re-create the control. You can use this macro or send the LVM_SETUNICODEFORMAT message explicitly.

ListView_SetView

Sets the view of a list-view control. You can use this macro or send the LVM_SETVIEW message explicitly.

ListView_SetWorkAreas

Sets the working area within a list-view control. You can use this macro or send the LVM_SETWORKAREAS message explicitly.

ListView_SortGroups

Uses an application-defined comparison function to sort groups by ID within a list-view control. You can use this macro or send the LVM_SORTGROUPS message explicitly.

ListView_SortItems

Uses an application-defined comparison function to sort the items of a list-view control. The index of each item changes to reflect the new sequence. You can use this macro or send the LVM_SORTITEMS message explicitly.

ListView_SortItemsEx

Uses an application-defined comparison function to sort the items of a list-view control. The index of each item changes to reflect the new sequence. You can use this macro or send the LVM_SORTITEMSEX message explicitly.

ListView_SubItemHitTest

Determines which list-view item or subitem is located at a given position. You can use this macro or send the LVM_SUBITEMHITTEST message explicitly.

ListView_Update

Updates a list-view item. If the list-view control has the LVS_AUTOARRANGE style, this macro causes the list-view control to be arranged. You can use this macro or send the LVM_UPDATE message explicitly.

Messages LVM_APPROXIMATEVIEWRECT

Calculates the approximate width and height required to display a given number of items. You can send this message explicitly or use the ListView_ApproximateViewRect macro.

LVM_ARRANGE

Arranges items in icon view. You can send this message explicitly or by using the ListView_Arrange macro.

LVM_CANCELEDITLABEL

Cancels an item text editing operation.

LVM_CREATEDRAGIMAGE

Creates a drag image list for the specified item. You can send this message explicitly or by using the ListView_CreateDragImage macro.

LVM_DELETEALLITEMS

Removes all items from a list-view control. You can send this message explicitly or by using the ListView_DeleteAllItems macro.

LVM_DELETECOLUMN

Removes a column from a list-view control. You can send this message explicitly or by using the ListView_DeleteColumn macro.

LVM_DELETEITEM

Removes an item from a list-view control. You can send this message explicitly or by using the ListView_DeleteItem macro.

LVM_EDITLABEL

Begins in-place editing of the specified list-view item's text. The message implicitly selects and focuses the specified item. You can send this message explicitly or by using the ListView_EditLabel macro.

LVM_ENABLEGROUPVIEW

Enables or disables whether the items in a list-view control display as a group.

LVM_ENSUREVISIBLE

Ensures that a list-view item is either entirely or partially visible, scrolling the list-view control if necessary. You can send this message explicitly or by using the ListView_EnsureVisible macro.

LVM_FINDITEM

Searches for a list-view item with the specified characteristics. You can send this message explicitly or by using the ListView_FindItem macro.

LVM_GETBKCOLOR

Retrieves the background color of a list-view control. You can send this message explicitly or by using the ListView_GetBkColor macro.

LVM_GETBKIMAGE

Retrieves the background image in a list-view control. You can send this message explicitly or by using the ListView_GetBkImage macro.

LVM_GETCALLBACKMASK

Retrieves the callback mask for a list-view control. You can send this message explicitly or by using the ListView_GetCallbackMask macro.

LVM_GETCOLUMN

Retrieves the attributes of a list-view control's column. You can send this message explicitly or by using the ListView_GetColumn macro.

LVM_GETCOLUMNORDERARRAY

Retrieves the current left-to-right order of columns in a list-view control. You can send this message explicitly or use the ListView_GetColumnOrderArray macro.

LVM_GETCOLUMNWIDTH

Retrieves the width of a column in report or list view. You can send this message explicitly or by using the ListView_GetColumnWidth macro.

LVM_GETCOUNTPERPAGE

Calculates the number of items that can fit vertically in the visible area of a list-view control when in list or report view. Only fully visible items are counted. You can send this message explicitly or by using the ListView_GetCountPerPage macro.

LVM_GETEDITCONTROL

Retrieves the handle to the edit control being used to edit a list-view item's text. You can send this message explicitly or by using the ListView_GetEditControl macro.

LVM_GETEXTENDEDLISTVIEWSTYLE

Retrieves the extended styles that are currently in use for a given list-view control. You can send this message explicitly or use the ListView_GetExtendedListViewStyle macro.

LVM_GETGROUPINFO

Retrieves group information.

LVM_GETGROUPMETRICS

Retrieves the metrics of a group.

LVM_GETHEADER

Retrieves the handle to the header control used by the list-view control. You can send this message explicitly or use the ListView_GetHeader macro.

LVM_GETHOTCURSOR

Retrieves the HCURSOR value used when the pointer is over an item while hot tracking is enabled. You can send this message explicitly or use the ListView_GetHotCursor macro.

LVM_GETHOTITEM

Retrieves the index of the hot item. You can send this message explicitly or use the ListView_GetHotItem macro.

LVM_GETHOVERTIME

Retrieves the amount of time that the mouse cursor must hover over an item before it is selected. You can send this message explicitly or use the ListView_GetHoverTime macro.

LVM_GETIMAGELIST

Retrieves the handle to an image list used for drawing list-view items. You can send this message explicitly or by using the ListView_GetImageList macro.

LVM_GETINSERTMARK

Retrieves the position of the insertion point.

LVM_GETINSERTMARKCOLOR

Retrieves the color of the insertion point.

LVM_GETINSERTMARKRECT

Retrieves the rectangle that bounds the insertion point.

LVM_GETISEARCHSTRING

Retrieves the incremental search string of a list-view control. You can send this message explicitly or by using the ListView_GetISearchString macro.

LVM_GETITEM

Retrieves some or all of a list-view item's attributes. You can send this message explicitly or by using the ListView_GetItem macro.

LVM_GETITEMCOUNT

Retrieves the number of items in a list-view control. You can send this message explicitly or by using the ListView_GetItemCount macro.

LVM_GETITEMPOSITION

Retrieves the position of a list-view item. You can send this message explicitly or by using the ListView_GetItemPosition macro.

LVM_GETITEMRECT

Retrieves the bounding rectangle for all or part of an item in the current view. You can send this message explicitly or by using the ListView_GetItemRect macro.

LVM_GETITEMSPACING

Determines the spacing between items in a list-view control. You can send this message explicitly or by using the ListView_GetItemSpacing macro.

LVM_GETITEMSTATE

Retrieves the state of a list-view item. You can send this message explicitly or by using the ListView_GetItemState macro.

LVM_GETITEMTEXT

Retrieves the text of a list-view item or subitem. You can send this message explicitly or by using the ListView_GetItemText macro.

LVM_GETNEXTITEM

Searches for a list-view item that has the specified properties and bears the specified relationship to a specified item. You can send this message explicitly or by using the ListView_GetNextItem macro.

LVM_GETNUMBEROFWORKAREAS

Retrieves the number of List-View Working Areas in a list-view control. You can send this message explicitly or use the ListView_GetNumberOfWorkAreas macro.

LVM_GETORIGIN

Retrieves the current view origin for a list-view control. You can send this message explicitly or by using the ListView_GetOrigin macro.

LVM_GETOUTLINECOLOR

Retrieves the color of the border of a list-view control if the LVS_EX_BORDERSELECT extended window style is set.

LVM_GETSELECTEDCOLUMN

Retrieves an integer that specifies the selected column.

LVM_GETSELECTEDCOUNT

Determines the number of selected items in a list-view control. You can send this message explicitly or by using the ListView_GetSelectedCount macro.

LVM_GETSELECTIONMARK

Retrieves the selection mark from a list-view control. You can send this message explicitly or use the ListView_GetSelectionMark macro.

LVM_GETSTRINGWIDTH

Determines the width of a specified string using the specified list-view control's current font. You can send this message explicitly or by using the ListView_GetStringWidth macro.

LVM_GETSUBITEMRECT

Retrieves information about the bounding rectangle for a subitem in a list-view control. You can send this message explicitly or by using the ListView_GetSubItemRect macro (recommended). This message is intended to be used only with list-view controls that use the LVS_REPORT style.

LVM_GETTEXTBKCOLOR

Retrieves the text background color of a list-view control. You can send this message explicitly or by using the ListView_GetTextBkColor macro.

LVM_GETTEXTCOLOR

Retrieves the text color of a list-view control. You can send this message explicitly or by using the ListView_GetTextColor macro.

LVM_GETTILEINFO

Retrieves information about a tile in a list-view control.

LVM_GETTILEVIEWINFO

Retrieves information about a list-view control in tile view.

LVM_GETTOOLTIPS

Retrieves the ToolTip control that the list-view control uses to display ToolTips. You can send this message explicitly or use the ListView_GetToolTips macro.

LVM_GETTOPINDEX

Retrieves the index of the topmost visible item when in list or report view. You can send this message explicitly or by using the ListView_GetTopIndex macro.

LVM_GETUNICODEFORMAT

Retrieves the UNICODE character format flag for the control. You can send this message explicitly or use the ListView_GetUnicodeFormat macro.

LVM_GETVIEW

Retrieves the current view of a list-view control.

LVM_GETVIEWRECT

Retrieves the bounding rectangle of all items in the list-view control. The list view must be in icon or small icon view. You can send this message explicitly or by using the ListView_GetViewRect macro.

LVM_GETWORKAREAS

Retrieves the working areas from a list-view control. You can send this message explicitly or use the ListView_GetWorkAreas macro.

LVM_HASGROUP

Determines whether the list-view control has a specified group.

LVM_HITTEST

Determines which list-view item, if any, is at a specified position. You can send this message explicitly or by using the ListView_HitTest macro.

LVM_INSERTCOLUMN

Inserts a new column in a list-view control. You can send this message explicitly or by using the ListView_InsertColumn macro.

LVM_INSERTGROUP

Inserts a group into a list-view control.

LVM_INSERTGROUPSORTED

Inserts a group into an ordered list of groups.

LVM_INSERTITEM

Inserts a new item in a list-view control. You can send this message explicitly or by using the ListView_InsertItem macro.

LVM_INSERTMARKHITTEST

Retrieves the insertion point closest to a specified point.

LVM_ISGROUPVIEWENABLED

Checks whether the list-view control has group view enabled.

LVM_MAPIDTOINDEX

Maps the ID of an item to an index.

LVM_MAPINDEXTOID

Maps the index of an item to a unique ID.

LVM_MOVEGROUP

Moves the group to the specified zero based index.

LVM_MOVEITEMTOGROUP

Moves an item specified by an index into a group.

LVM_REDRAWITEMS

Forces a list-view control to redraw a range of items. You can send this message explicitly or by using the ListView_RedrawItems macro.

LVM_REMOVEALLGROUPS

Removes all groups from a list-view control.

LVM_REMOVEGROUP

Removes a group from a list-view control.

LVM_SCROLL

Scrolls the content of a list-view control. You can send this message explicitly or by using the ListView_Scroll macro.

LVM_SETBKCOLOR

Sets the background color of a list-view control. You can send this message explicitly or by using the ListView_SetBkColor macro.

LVM_SETBKIMAGE

Sets the background image in a list-view control. You can send this message explicitly or by using the ListView_SetBkImage macro.

LVM_SETCALLBACKMASK

Changes the callback mask for a list-view control. You can send this message explicitly or by using the ListView_SetCallbackMask macro.

LVM_SETCOLUMN

Sets the attributes of a list-view column. You can send this message explicitly or by using the ListView_SetColumn macro.

LVM_SETCOLUMNORDERARRAY

Sets the left-to-right order of columns in a list-view control. You can send this message explicitly or use the ListView_SetColumnOrderArray macro.

LVM_SETCOLUMNWIDTH

Changes the width of a column in report-view mode or the width of all columns in list-view mode. You can send this message explicitly or use the ListView_SetColumnWidth macro.

LVM_SETEXTENDEDLISTVIEWSTYLE

Sets extended styles in list-view controls. You can send this message explicitly or use the ListView_SetExtendedListViewStyle or ListView_SetExtendedListViewStyleEx macro.

LVM_SETGROUPINFO

Sets group information.

LVM_SETGROUPMETRICS

Sets the metrics of a group.

LVM_SETHOTCURSOR

Sets the HCURSOR value that the list-view control uses when the pointer is over an item while hot tracking is enabled. You can send this message explicitly or use the ListView_SetHotCursor macro. To check whether or not hot tracking is enabled, call SystemParametersInfo.

LVM_SETHOTITEM

Sets the hot item for a list-view control. You can send this message explicitly or use the ListView_SetHotItem macro.

LVM_SETHOVERTIME

Sets the amount of time which the mouse cursor must hover over an item before it is selected. You can send this message explicitly or use the ListView_SetHoverTime macro.

LVM_SETICONSPACING

Sets the spacing between icons in list-view controls that have the LVS_ICON style. You can send this message explicitly or by using the ListView_SetIconSpacing macro.

LVM_SETIMAGELIST

Assigns an image list to a list-view control. You can send this message explicitly or by using the ListView_SetImageList macro.

LVM_SETINFOTIP

Sets ToolTip text.

LVM_SETINSERTMARK

Sets the insertion point to the defined position.

LVM_SETINSERTMARKCOLOR

Sets the color of the insertion point.

LVM_SETITEM

Sets some or all of a list-view item's attributes. You can also send LVM_SETITEM to set the text of a subitem. You can send this message explicitly or by using the ListView_SetItem macro.

LVM_SETITEMCOUNT

Causes the list-view control to allocate memory for the specified number of items or sets the virtual number of items in a virtual list-view control. This depends on how the list-view control was created. You can send this message explicitly or use the ListView_SetItemCount or ListView_SetItemCountEx macros.

LVM_SETITEMPOSITION

Moves an item to a specified position in a list-view control (must be in icon or small icon view). You can send this message explicitly or by using the ListView_SetItemPosition macro.

LVM_SETITEMPOSITION32

Moves an item to a specified position in a list-view control (must be in icon or small icon view). This message differs from the LVM_SETITEMPOSITION message in that it uses 32-bit coordinates. You can send this message explicitly or by using the ListView_SetItemPosition32 macro.

LVM_SETITEMSTATE

Changes the state of an item in a list-view control. You can send this message explicitly or by using the ListView_SetItemState macro.

LVM_SETITEMTEXT

Changes the text of a list-view item or subitem. You can send this message explicitly or by using the ListView_SetItemText macro.

LVM_SETOUTLINECOLOR

Sets the color of the border of a list-view control if the LVS_EX_BORDERSELECT extended window style is set.

LVM_SETSELECTEDCOLUMN

Sets the index of the selected column.

LVM_SETSELECTIONMARK

Sets the selection mark in a list-view control. You can send this message explicitly or use the ListView_SetSelectionMark macro.

LVM_SETTEXTBKCOLOR

Sets the background color of text in a list-view control. You can send this message explicitly or by using the ListView_SetTextBkColor macro.

LVM_SETTEXTCOLOR

Sets the text color of a list-view control. You can send this message explicitly or by using the ListView_SetTextColor macro.

LVM_SETTILEINFO

Sets information for a tile of a list-view control.

LVM_SETTILEVIEWINFO

Sets information that a list-view control uses in tile view.

LVM_SETTILEWIDTH

Not currently supported.

LVM_SETTOOLTIPS

Sets the ToolTip control that the list-view control will use to display ToolTips. You can send this message explicitly or use the ListView_SetToolTips macro.

LVM_SETUNICODEFORMAT

Sets the UNICODE character format flag for the control. This message allows you to change the character set used by the control at run time rather than having to re-create the control. You can send this message explicitly or use the ListView_SetUnicodeFormat macro.

LVM_SETVIEW

Sets the view of a list-view control.

LVM_SETWORKAREAS

Sets the working areas within a list-view control. You can send this message explicitly or use the ListView_SetWorkAreas macro.

LVM_SORTGROUPS

Uses an application-defined comparison function to sort groups by ID within a list-view control.

LVM_SORTITEMS

Uses an application-defined comparison function to sort the items of a list-view control. The index of each item changes to reflect the new sequence. You can send this message explicitly or by using the ListView_SortItems macro.

LVM_SORTITEMSEX

Uses an application-defined comparison function to sort the items of a list-view control. The index of each item changes to reflect the new sequence. You can send this message explicitly or by using the ListView_SortItemsEx macro.

LVM_SUBITEMHITTEST

Determines which list-view item or subitem is at a given position. You can send this message explicitly or by using the ListView_SubItemHitTest macro.

LVM_UPDATE

Updates a list-view item. If the list-view control has the LVS_AUTOARRANGE style, this macro causes the list-view control to be arranged. You can send this message explicitly or by using the ListView_Update macro.

Notifications LVN_BEGINDRAG

Notifies a list-view control's parent window that a drag-and-drop operation involving the left mouse button is being initiated. This notification message is sent in the form of a WM_NOTIFY message.

LVN_BEGINLABELEDIT

Notifies a list-view control's parent window about the start of label editing for an item. This notification message is sent in the form of a WM_NOTIFY message.

LVN_BEGINRDRAG

Notifies a list-view control's parent window that a drag-and-drop operation involving the right mouse button is being initiated. This notification message is sent in the form of a WM_NOTIFY message.

LVN_BEGINSCROLL

Notifies a list-view control's parent window when a scrolling operation starts.

LVN_COLUMNCLICK

Notifies a list-view control's parent window that a column was clicked. This notification message is sent in the form of a WM_NOTIFY message.

LVN_DELETEALLITEMS

Notifies a list-view control's parent window that all items in the control are about to be deleted. This notification message is sent in the form of a WM_NOTIFY message.

LVN_DELETEITEM

Notifies a list-view control's parent window that an item is about to be deleted. This notification message is sent in the form of a WM_NOTIFY message.

LVN_ENDLABELEDIT

Notifies a list-view control's parent window about the end of label editing for an item. This notification message is sent in the form of a WM_NOTIFY message.

LVN_ENDSCROLL

Notifies a list-view control's parent window when a scrolling operation ends.

LVN_GETDISPINFO

Sent by a list-view control to its parent window. It is a request for the parent window to provide information needed to display or sort a list-view item. This notification message is sent in the form of a WM_NOTIFY message.

LVN_GETINFOTIP

Sent by a large icon view list-view control that has the LVS_EX_INFOTIP extended style. This notification is sent when the list-view control is requesting additional text information to be displayed in a ToolTip. It is sent in the form of a WM_NOTIFY message.

LVN_HOTTRACK

Sent by a list-view control when the user moves the mouse over an item. This notification is only sent by list-view controls that have the LVS_EX_TRACKSELECT extended list-view style. It is sent in the form of a WM_NOTIFY message.

LVN_INSERTITEM

Notifies a list-view control's parent window that a new item was inserted. This notification message is sent in the form of a WM_NOTIFY message.

LVN_ITEMACTIVATE

Sent by a list-view control when the user activates an item. This notification is sent in the form of a WM_NOTIFY message.

LVN_ITEMCHANGED

Notifies a list-view control's parent window that an item has changed. This notification message is sent in the form of a WM_NOTIFY message.

LVN_ITEMCHANGING

Notifies a list-view control's parent window that an item is changing. This notification message is sent in the form of a WM_NOTIFY message.

LVN_KEYDOWN

Notifies a list-view control's parent window that a key has been pressed. This notification message is sent in the form of a WM_NOTIFY message.

LVN_MARQUEEBEGIN

Notifies a list-view control's parent window that a bounding box (marquee) selection has begun. This notification message is sent in the form of a WM_NOTIFY message.

LVN_ODCACHEHINT

Sent by a virtual list-view control when the contents of its display area have changed. For example, a list-view control sends this notification when the user scrolls the control's display. The LVN_ODCACHEHINT notification message is sent in the form of a WM_NOTIFY message.

LVN_ODFINDITEM

Sent by a virtual list-view control when it needs the owner to find a particular callback item. For example, the control will send this notification when it receives shortcut keyboard input or when it receives an LVM_FINDITEM message.

LVN_ODSTATECHANGED

Sent by a list-view control when the state of an item or range of items has changed. This notification is sent in the form of a WM_NOTIFY message.

LVN_SETDISPINFO

Notifies a list-view control's parent window that it must update the information it maintains for an item. This notification message is sent in the form of a WM_NOTIFY message.

NM_CLICK (list view)

Sent by a list-view control when the user clicks an item with the left mouse button. This notification message is sent in the form of a WM_NOTIFY message.

NM_CUSTOMDRAW (list view)

Sent by a list-view control to notify its parent windows about drawing operations. This notification is sent in the form of a WM_NOTIFY message.

NM_DBLCLK (list view)

Sent by a list-view control when the user double-clicks an item with the left mouse button. This notification message is sent in the form of a WM_NOTIFY message.

NM_HOVER (list view)

Sent by a list-view control when the mouse hovers over an item. This notification message is sent in the form of a WM_NOTIFY message.

NM_KILLFOCUS (list view)

Notifies a list-view control's parent window that the control has lost the input focus. NM_KILLFOCUS (list view) is sent in the form of a WM_NOTIFY message.

NM_RCLICK (list view)

Sent by a list-view control when the user clicks an item with the right mouse button. This notification message is sent in the form of a WM_NOTIFY message.

NM_RDBLCLK (list view)

Sent by a list-view control when the user double-clicks an item with the right mouse button. This notification message is sent in the form of a WM_NOTIFY message.

NM_RELEASEDCAPTURE (list view)

Notifies a list-view control's parent window that the control is releasing mouse capture. This notification is sent in the form of a WM_NOTIFY message.

NM_RETURN (list view)

Notifies a list-view control's parent window that the control has the input focus and that the user has pressed the ENTER key. NM_RETURN is sent in the form of a WM_NOTIFY message.

NM_SETFOCUS (list view)

Notifies a list-view control's parent window that the control has received the input focus. NM_SETFOCUS (list view) is sent in the form of a WM_NOTIFY message.

Structures LVBKIMAGE

Contains information about the background image of a list-view control. This structure is used for both setting and retrieving background image information.

LVCOLUMN

Contains information about a column in report view. This structure is used both for creating and manipulating columns. This structure supersedes the LVCOLUMN structure.

LVFINDINFO

Contains information used when searching for a list-view item. This structure is identical to LVFINDINFO but has been renamed to fit standard naming conventions.

LVGROUP

Used to set and retrieve groups.

LVGROUPMETRICS

Used to retrieve or set group metrics.

LVHITTESTINFO

Has been extended to accommodate subitem hit-testing. The LVHITTESTINFO structure contains information about a hit test. It is used in association with the LVM_HITTEST and LVM_SUBITEMHITTEST messages and their related macros. This structure supersedes the LVHITTESTINFO structure.

LVINSERTGROUPSORTED

Used to sort groups. It is used with LVM_INSERTGROUPSORTED.

LVINSERTMARK

Used to describe insertion points.

LVITEM

Specifies or receives the attributes of a list-view item. This structure has been updated to support a new mask value (LVIF_INDENT) that enables item indenting. This structure supersedes the LV_ITEM structure.

LVSETINFOTIP

Provides information about tooltip text that is to be set.

LVTILEINFO

Provides information about an item in a list-view control when it is displayed in tile view.

LVTILEVIEWINFO

Provides information about a list-view control when it is displayed in tile view.

NMITEMACTIVATE

Contains information about an LVN_ITEMACTIVATE notification message.

NMLISTVIEW

Contains information about a list-view notification message. This structure is the same as the NM_LISTVIEW structure but has been renamed to fit standard naming conventions.

NMLVCACHEHINT

Contains information used to update the cached item information for use with a virtual list view.

NMLVCUSTOMDRAW

Contains information specific to an NM_CUSTOMDRAW (list view) notification message sent by a list-view control.

NMLVDISPINFO

Contains information about an LVN_GETDISPINFO or LVN_SETDISPINFO notification message. This structure is the same as the LV_DISPINFO structure, but has been renamed to fit standard naming conventions.

NMLVFINDITEM

Contains information the owner needs to find items requested by a virtual list view control. This structure is used with the LVN_ODFINDITEM notification message.

NMLVGETINFOTIP

Contains and receives list-view item information needed to display a ToolTip for an item. This structure is used with the LVN_GETINFOTIP notification message.

NMLVKEYDOWN

Contains information used in processing the LVN_KEYDOWN notification message. This structure is the same as the NMLVKEYDOWN structure but has been renamed to fit standard naming conventions.

NMLVODSTATECHANGE

Structure that contains information for use in processing the LVN_ODSTATECHANGED notification message.

NMLVSCROLL

Provides information about a scrolling operation.

Constants Extended List-View Styles

List-view control styles have been extended. To employ these new styles, use the LVM_SETEXTENDEDLISTVIEWSTYLE message or one of the ListView_SetExtendedListViewStyle or ListView_SetExtendedListViewStyleEx macros.

List-View Item States

An item's state value consists of the item's state, an optional overlay mask index, and an optional state image mask index.

An item's state determines its appearance and functionality. The state can be zero or one or more of the following values:

List-View Window Styles

The following window styles are specific to list-view controls.

本文地址:http://com.8s8s.com/it/it638.htm