} else {
title_index++;
- if (sizeof(title_hits) / sizeof(title_hits[0]) <= title_index)
+ if (ARRAY_SIZE(title_hits) <= title_index)
break;
todo_wine_if(title_hits[title_index].todo)
todo_wine ok(month_count + year_count >= 1, "Not enough month and year items\n");
- ok(r.right <= x && title_index + 1 == sizeof(title_hits) / sizeof(title_hits[0]),
- "Wrong title layout\n");
+ ok(r.right <= x && title_index + 1 == ARRAY_SIZE(title_hits), "Wrong title layout\n");
DestroyWindow(hwnd);
}
mchit.iOffset = -1;
mchit.iCol = mchit.iRow = -1;
mchit.uHit = 0;
- mchit.rc.left = mchit.rc.right = mchit.rc.top = mchit.rc.bottom = -1;
+ SetRect(&mchit.rc, -1, -1, -1, -1);
ret = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
expect_hex(MCHT_CALENDARDATE, ret);
expect_hex(MCHT_CALENDARDATE, mchit.uHit);
mchit.iOffset = -1;
mchit.iCol = mchit.iRow = -1;
mchit.uHit = 0;
- mchit.rc.left = mchit.rc.right = mchit.rc.top = mchit.rc.bottom = -1;
+ SetRect(&mchit.rc, -1, -1, -1, -1);
ret = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
expect_hex(MCHT_TITLE, ret);
expect_hex(MCHT_TITLE, mchit.uHit);
mchit.iOffset = -2;
mchit.iCol = mchit.iRow = -2;
mchit.uHit = ~0;
- mchit.rc.left = mchit.rc.right = mchit.rc.top = mchit.rc.bottom = -1;
+ SetRect(&mchit.rc, -1, -1, -1, -1);
ret = SendMessageA(hwnd, MCM_HITTEST, 0, (LPARAM)&mchit);
todo_wine expect_hex(MCHT_NOWHERE, ret);
todo_wine expect_hex(MCHT_NOWHERE, mchit.uHit);
};
int i;
- for(i = 0; i < sizeof styles / sizeof styles[0]; i++)
+ for(i = 0; i < ARRAY_SIZE(styles); i++)
{
hwnd = create_monthcal_control(styles[i].val);
SetWindowLongPtrA(hwnd, GWLP_ID, SEL_NOTIFY_TEST_ID);