返回 TCHITTESTINFO结构
Determines which tab, if any, is at a specified screen position. You can use this macro or send the TCM_HITTEST message explicitly.
Syntax
int TabCtrl_HitTest(
HWND hwnd,
LPTCHITTESTINFO pinfo
);
Parameters
hwnd
Handle to the tab control.
pinfo
Pointer to a TCHITTESTINFO structure that specifies the screen position to test.
//////////////////////////////////
TCHITTESTINFO Structure
Contains information about a hit test. This structure supersedes the TC_HITTESTINFO structure.
Syntax
typedef struct tagTCHITTESTINFO {
POINT pt;
UINT flags;
} TCHITTESTINFO, *LPTCHITTESTINFO;
Members
pt
Position to hit test, in client coordinates.
flags
Variable that receives the results of a hit test. The tab control sets this member to one of the following values:
TCHT_NOWHERE
The position is not over a tab.
TCHT_ONITEM
The position is over a tab but not over its icon or its text. For owner-drawn tab controls, this value is specified if the position is anywhere over a tab.
TCHT_ONITEMICON
The position is over a tab's icon.
TCHT_ONITEMLABEL
The position is over a tab's text.
TCHT_ONITEM is a bitwise-OR operation on TCHT_ONITEMICON and TCHT_ONITEMLABEL.