LVHITTESTINFO structure

转自:https://msdn.microsoft.com/zh-cn/vstudio/bb774754 谢谢

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

Syntax


typedef struct _LVHITTESTINFO {
  POINT pt;
  UINT  flags;
  int   iItem;
  int   iSubItem;
  int   iGroup;
} LVHITTESTINFO, *LPLVHITTESTINFO;

Members

pt

Type: POINT

The position to hit test, in client coordinates.

flags

Type: UINT

The variable that receives information about the results of a hit test. This member can be one or more of the following values:

You can use LVHT_ABOVE, LVHT_BELOW, LVHT_TOLEFT, and LVHT_TORIGHT to determine whether to scroll the contents of a list-view control. Two of these values may be combined. For example, if the position is above and to the left of the client area, you could use both LVHT_ABOVE and LVHT_TOLEFT. 

You can test for LVHT_ONITEM to determine whether a specified position is over a list-view item. This value is a bitwise-OR operation on LVHT_ONITEMICON, LVHT_ONITEMLABEL, and LVHT_ONITEMSTATEICON.

Value Meaning
LVHT_ABOVE

The position is above the control's client area.

LVHT_BELOW

The position is below the control's client area.

LVHT_NOWHERE

The position is inside the list-view control's client window, but it is not over a list item.

LVHT_ONITEMICON

The position is over a list-view item's icon.

LVHT_ONITEMLABEL

The position is over a list-view item's text.

LVHT_ONITEMSTATEICON

The position is over the state image of a list-view item.

LVHT_TOLEFT

The position is to the left of the list-view control's client area.

LVHT_TORIGHT

The position is to the right of the list-view control's client area.

LVHT_EX_GROUP_HEADER

Windows Vista. The point is within the group header.

LVHT_EX_GROUP_FOOTER

Windows Vista. The point is within the group footer.

LVHT_EX_GROUP_COLLAPSE

Windows Vista. The point is within the collapse/expand button of the group.

LVHT_EX_GROUP_BACKGROUND

Windows Vista. The point is within the area of the group where items are displayed.

LVHT_EX_GROUP_STATEICON

Windows Vista. The point is within the state icon of the group.

LVHT_EX_GROUP_SUBSETLINK

Windows Vista. The point is within the subset link of the group.

LVHT_EX_GROUP

Windows Vista. LVHT_EX_GROUP_BACKGROUND | LVHT_EX_GROUP_COLLAPSE | LVHT_EX_GROUP_FOOTER | LVHT_EX_GROUP_HEADER | LVHT_EX_GROUP_STATEICON | LVHT_EX_GROUP_SUBSETLINK.

LVHT_EX_ONCONTENTS

Windows Vista. The point is within the icon or text content of the item and not on the background.

LVHT_EX_FOOTER

Windows Vista. The point is within the footer of the list-view control.

 

iItem

Type: int

Receives the index of the matching item. Or if hit-testing a subitem, this value represents the subitem's parent item.

iSubItem

Type: int

Version 4.70. Receives the index of the matching subitem. When hit-testing an item, this member will be zero.

iGroup

Type: int

Windows Vista. Group index of the item hit (read only). Valid only for owner data. If the point is within an item that is displayed in multiple groups then iGroup will specify the group index of the item.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Commctrl.h


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值