Paul Vriens : user32/tests: Run tests on win95 again.

Alexandre Julliard julliard at winehq.org
Tue Oct 7 08:54:05 CDT 2008


Module: wine
Branch: master
Commit: 63f15d440033fa49c421fa9d8e92aad35a966a74
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=63f15d440033fa49c421fa9d8e92aad35a966a74

Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date:   Mon Oct  6 20:47:44 2008 +0200

user32/tests: Run tests on win95 again.

---

 dlls/user32/tests/scroll.c |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/dlls/user32/tests/scroll.c b/dlls/user32/tests/scroll.c
index 62513fa..9547d54 100644
--- a/dlls/user32/tests/scroll.c
+++ b/dlls/user32/tests/scroll.c
@@ -132,11 +132,19 @@ static void scrollbar_test4(void)
     BOOL ret;
     SCROLLBARINFO sbi;
     RECT rect;
+    BOOL (WINAPI *pGetScrollBarInfo)(HWND, LONG, LPSCROLLBARINFO);
+
+    pGetScrollBarInfo = (void*)GetProcAddress(GetModuleHandleA("user32.dll"), "GetScrollBarInfo");
+    if (!pGetScrollBarInfo)
+    {
+        win_skip("GetScrollBarInfo is not available\n");
+        return;
+    }
 
     /* Test GetScrollBarInfo to make sure it returns rcScrollBar in screen
      * coordinates. */
     sbi.cbSize = sizeof(sbi);
-    ret = GetScrollBarInfo( hScroll, OBJID_CLIENT, &sbi);
+    ret = pGetScrollBarInfo( 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" );
@@ -153,7 +161,7 @@ static void scrollbar_test4(void)
      * making sure that it shifts the rcScrollBar value. */
     ShowWindow( hMainWnd, SW_SHOW );
     sbi.cbSize = sizeof(sbi);
-    ret = GetScrollBarInfo( hMainWnd, OBJID_HSCROLL, &sbi);
+    ret = pGetScrollBarInfo( hMainWnd, OBJID_HSCROLL, &sbi);
     ok( ret, "The GetScrollBarInfo() call should not fail.\n" );
     GetWindowRect( hMainWnd, &rect );
     ok( ret, "The GetWindowRect() call should not fail.\n" );
@@ -161,7 +169,7 @@ static void scrollbar_test4(void)
                 rect.right-rect.left, rect.bottom-rect.top, TRUE );
     rect = sbi.rcScrollBar;
     OffsetRect(&rect, 5, 5);
-    ret = GetScrollBarInfo( hMainWnd, OBJID_HSCROLL, &sbi);
+    ret = pGetScrollBarInfo( hMainWnd, OBJID_HSCROLL, &sbi);
     ok( ret, "The GetScrollBarInfo() call should not fail.\n" );
     ok( EqualRect(&rect, &sbi.rcScrollBar),
         "PreviousRect(%d, %d, %d, %d) != CurrentRect(%d, %d, %d, %d)\n",
@@ -170,7 +178,7 @@ static void scrollbar_test4(void)
         sbi.rcScrollBar.bottom, sbi.rcScrollBar.right );
 
     sbi.cbSize = sizeof(sbi);
-    ret = GetScrollBarInfo( hMainWnd, OBJID_VSCROLL, &sbi);
+    ret = pGetScrollBarInfo( hMainWnd, OBJID_VSCROLL, &sbi);
     ok( ret, "The GetScrollBarInfo() call should not fail.\n" );
     GetWindowRect( hMainWnd, &rect );
     ok( ret, "The GetWindowRect() call should not fail.\n" );
@@ -178,7 +186,7 @@ static void scrollbar_test4(void)
                 rect.right-rect.left, rect.bottom-rect.top, TRUE );
     rect = sbi.rcScrollBar;
     OffsetRect(&rect, 5, 5);
-    ret = GetScrollBarInfo( hMainWnd, OBJID_VSCROLL, &sbi);
+    ret = pGetScrollBarInfo( hMainWnd, OBJID_VSCROLL, &sbi);
     ok( ret, "The GetScrollBarInfo() call should not fail.\n" );
     ok( EqualRect(&rect, &sbi.rcScrollBar),
         "PreviousRect(%d, %d, %d, %d) != CurrentRect(%d, %d, %d, %d)\n",




More information about the wine-cvs mailing list