comctl32/tab: Handle state mask in TCM_[G,S]ETITEM.
This commit is contained in:
parent
751732e694
commit
db60f69cba
|
@ -2719,7 +2719,8 @@ TAB_SetItemT (TAB_INFO *infoPtr, INT iItem, LPTCITEMW tabItem, BOOL bUnicode)
|
||||||
FIXME("TCIF_RTLREADING\n");
|
FIXME("TCIF_RTLREADING\n");
|
||||||
|
|
||||||
if (tabItem->mask & TCIF_STATE)
|
if (tabItem->mask & TCIF_STATE)
|
||||||
wineItem->dwState = tabItem->dwState;
|
wineItem->dwState = (wineItem->dwState & ~tabItem->dwStateMask) |
|
||||||
|
( tabItem->dwState & tabItem->dwStateMask);
|
||||||
|
|
||||||
if (tabItem->mask & TCIF_TEXT)
|
if (tabItem->mask & TCIF_TEXT)
|
||||||
{
|
{
|
||||||
|
@ -2766,7 +2767,7 @@ TAB_GetItemT (TAB_INFO *infoPtr, INT iItem, LPTCITEMW tabItem, BOOL bUnicode)
|
||||||
FIXME("TCIF_RTLREADING\n");
|
FIXME("TCIF_RTLREADING\n");
|
||||||
|
|
||||||
if (tabItem->mask & TCIF_STATE)
|
if (tabItem->mask & TCIF_STATE)
|
||||||
tabItem->dwState = wineItem->dwState;
|
tabItem->dwState = wineItem->dwState & tabItem->dwStateMask;
|
||||||
|
|
||||||
if (tabItem->mask & TCIF_TEXT)
|
if (tabItem->mask & TCIF_TEXT)
|
||||||
{
|
{
|
||||||
|
|
|
@ -831,6 +831,29 @@ static void test_getters_setters(HWND parent_wnd, INT nTabs)
|
||||||
|
|
||||||
ok_sequence(sequences, TAB_SEQ_INDEX, getset_item_seq, "Getset item test sequence", FALSE);
|
ok_sequence(sequences, TAB_SEQ_INDEX, getset_item_seq, "Getset item test sequence", FALSE);
|
||||||
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "Getset item test parent sequence", FALSE);
|
ok_sequence(sequences, PARENT_SEQ_INDEX, empty_sequence, "Getset item test parent sequence", FALSE);
|
||||||
|
|
||||||
|
/* TCIS_BUTTONPRESSED doesn't depend on tab style */
|
||||||
|
memset(&tcItem, 0, sizeof(tcItem));
|
||||||
|
tcItem.mask = TCIF_STATE;
|
||||||
|
tcItem.dwStateMask = TCIS_BUTTONPRESSED;
|
||||||
|
tcItem.dwState = TCIS_BUTTONPRESSED;
|
||||||
|
ok ( SendMessage(hTab, TCM_SETITEM, 0, (LPARAM) &tcItem), "Setting new item failed.\n");
|
||||||
|
tcItem.dwState = 0;
|
||||||
|
ok ( SendMessage(hTab, TCM_GETITEM, 0, (LPARAM) &tcItem), "Getting item failed.\n");
|
||||||
|
ok (tcItem.dwState == TCIS_BUTTONPRESSED, "TCIS_BUTTONPRESSED should be set.\n");
|
||||||
|
/* next highlight item, test that dwStateMask actually masks */
|
||||||
|
tcItem.mask = TCIF_STATE;
|
||||||
|
tcItem.dwStateMask = TCIS_HIGHLIGHTED;
|
||||||
|
tcItem.dwState = TCIS_HIGHLIGHTED;
|
||||||
|
ok ( SendMessage(hTab, TCM_SETITEM, 0, (LPARAM) &tcItem), "Setting new item failed.\n");
|
||||||
|
tcItem.dwState = 0;
|
||||||
|
ok ( SendMessage(hTab, TCM_GETITEM, 0, (LPARAM) &tcItem), "Getting item failed.\n");
|
||||||
|
ok (tcItem.dwState == TCIS_HIGHLIGHTED, "TCIS_HIGHLIGHTED should be set.\n");
|
||||||
|
tcItem.mask = TCIF_STATE;
|
||||||
|
tcItem.dwStateMask = TCIS_BUTTONPRESSED;
|
||||||
|
tcItem.dwState = 0;
|
||||||
|
ok ( SendMessage(hTab, TCM_GETITEM, 0, (LPARAM) &tcItem), "Getting item failed.\n");
|
||||||
|
ok (tcItem.dwState == TCIS_BUTTONPRESSED, "TCIS_BUTTONPRESSED should be set.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Testing GetSet ToolTip */
|
/* Testing GetSet ToolTip */
|
||||||
|
|
Loading…
Reference in New Issue