comctl32/header: Fix hittesting flags, extend tests a bit.
This commit is contained in:
parent
af6de9d7a3
commit
ce372ca4db
|
@ -1224,10 +1224,12 @@ HEADER_GetUnicodeFormat (const HEADER_INFO *infoPtr)
|
|||
static LRESULT
|
||||
HEADER_HitTest (const HEADER_INFO *infoPtr, LPHDHITTESTINFO phti)
|
||||
{
|
||||
UINT outside = HHT_NOWHERE | HHT_ABOVE | HHT_BELOW | HHT_TOLEFT | HHT_TORIGHT;
|
||||
|
||||
HEADER_InternalHitTest (infoPtr, &phti->pt, &phti->flags, &phti->iItem);
|
||||
|
||||
if (phti->flags == HHT_NOWHERE)
|
||||
return -1;
|
||||
if (phti->flags & outside)
|
||||
return phti->iItem = -1;
|
||||
else
|
||||
return phti->iItem;
|
||||
}
|
||||
|
|
|
@ -904,6 +904,7 @@ static void test_hdm_hittest(HWND hParent)
|
|||
retVal = SendMessage(hChild, HDM_HITTEST, 0, (LPARAM) &hdHitTestInfo);
|
||||
expect(0, retVal);
|
||||
expect(0, hdHitTestInfo.iItem);
|
||||
expect(HHT_ONDIVIDER, hdHitTestInfo.flags);
|
||||
|
||||
pt.x = secondItemRightBoundary - 1;
|
||||
pt.y = bottomBoundary - 1;
|
||||
|
@ -911,15 +912,15 @@ static void test_hdm_hittest(HWND hParent)
|
|||
retVal = SendMessage(hChild, HDM_HITTEST, 1, (LPARAM) &hdHitTestInfo);
|
||||
expect(1, retVal);
|
||||
expect(1, hdHitTestInfo.iItem);
|
||||
expect(HHT_ONDIVIDER, hdHitTestInfo.flags);
|
||||
|
||||
pt.x = secondItemRightBoundary;
|
||||
pt.y = bottomBoundary + 1;
|
||||
hdHitTestInfo.pt = pt;
|
||||
todo_wine
|
||||
{
|
||||
retVal = SendMessage(hChild, HDM_HITTEST, 0, (LPARAM) &hdHitTestInfo);
|
||||
expect(-1, retVal);
|
||||
}
|
||||
retVal = SendMessage(hChild, HDM_HITTEST, 0, (LPARAM) &hdHitTestInfo);
|
||||
expect(-1, retVal);
|
||||
expect(-1, hdHitTestInfo.iItem);
|
||||
expect(HHT_BELOW, hdHitTestInfo.flags);
|
||||
|
||||
ok_sequence(sequences, HEADER_SEQ_INDEX, hittest_seq, "hittest sequence testing", FALSE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue