Commit 48e74289 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/tab: Remove direct access to items array.

parent bfeaad0d
......@@ -252,8 +252,8 @@ static inline LRESULT TAB_SetCurSel (TAB_INFO *infoPtr, INT iItem)
return -1;
else {
if (infoPtr->iSelected != iItem) {
infoPtr->items[prevItem].dwState &= ~TCIS_BUTTONPRESSED;
infoPtr->items[iItem].dwState |= TCIS_BUTTONPRESSED;
TAB_GetItem(infoPtr, prevItem)->dwState &= ~TCIS_BUTTONPRESSED;
TAB_GetItem(infoPtr, iItem)->dwState |= TCIS_BUTTONPRESSED;
infoPtr->iSelected=iItem;
infoPtr->uFocus=iItem;
......@@ -1956,7 +1956,7 @@ static void TAB_DrawItem(const TAB_INFO *infoPtr, HDC hdc, INT iItem)
}
else /* ! selected */
{
DWORD state = infoPtr->items[iItem].dwState;
DWORD state = TAB_GetItem(infoPtr, iItem)->dwState;
if (state & TCIS_BUTTONPRESSED)
DrawEdge(hdc, &r, EDGE_SUNKEN, BF_SOFT|BF_RECT);
......@@ -3113,7 +3113,7 @@ static LRESULT TAB_RemoveImage (TAB_INFO *infoPtr, INT image)
/* shift indices, repaint items if needed */
for (i = 0; i < infoPtr->uNumItem; i++)
{
idx = &infoPtr->items[i].iImage;
idx = &TAB_GetItem(infoPtr, i)->iImage;
if (*idx >= image)
{
if (*idx == image)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment