"Dylan Smith" dylan.ah.smith@gmail.com wrote:
@@ -1252,6 +1253,9 @@ static BOOL SCROLL_GetScrollBarInfo(HWND hwnd, LONG idObject, LPSCROLLBARINFO in
SCROLL_GetScrollBarRect(hwnd, nBar, &info->rcScrollBar, &nDummy, &info->dxyLineButton, &info->xyThumbTop);
- /* rcScrollBar needs to be in screen coordinates */
- GetWindowRect(hwnd, &rect);
- OffsetRect(&info->rcScrollBar, rect.left, rect.top);
You need to fix SCROLL_GetScrollBarRect for the SB_CTL case instead.
+static void scrollbar_test4(void) +{
- BOOL ret;
- SCROLLBARINFO sbi;
- RECT rect;
- /* Test GetScrollBarInfo to make sure it returns rcScrollBar in screen
* coordinates. */
- sbi.cbSize = sizeof(sbi);
- ret = GetScrollBarInfo( hScroll, OBJID_CLIENT, &sbi);
- ok( ret, "The GetScrollBarInfo() call should not fail.\n" );
- GetWindowRect( hScroll, &rect );
- ok( ret, "The GetWindowRect() call should not fail.\n" );
- ok( !(sbi.rgstate[0] & (STATE_SYSTEM_INVISIBLE|STATE_SYSTEM_OFFSCREEN)),
"unexpected rgstate(0x%x)\n", sbi.rgstate[0]);
- ok( !memcmp(&rect, &sbi.rcScrollBar, sizeof(RECT)),
"WindowRect(%d, %d, %d, %d) != rcScrollBar(%d, %d, %d, %d)\n",
EqualRect is better than memcmp.