<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body><div style="text-align: left;"><pre>My name is Brandy Liu.  I'm a currently a student of UCLA.  <br>I hereby certify that I wrote this code without<br>copying from anyone else's sources, and I've never seen any secret<br>Microsoft source code.<br><br><br><br>Index:dlls/comctl32/tests/progress.c<br>============================================================================<br>--- dlls/comctl32//tests/progress.c        2007-03-01 11:54:35.000000000 -0800<br>+++ dlls/comctl32/mytests/progress.c        2007-02-23 13:17:04.000000000 -0800<br>@@ -135,15 +135,56 @@<br>  * Tests if a progress bar repaints itself immediately when it receives<br>  * some specific messages.<br>  */<br>-static void test_redraw(void)<br>+<br>+static void test_setRange(void)<br> {<br>     RECT client_rect;<br>+    int result, result32;<br>+    update_window(hProgressWnd);<br>+<br>+    /* PBM_SETRANGE */<br>+    result = SendMessageA(hProgressWnd, PBM_SETRANGE, 0, 100);<br>+    ok(LOWORD(result) == 0, "Expected 0, got %d\n", LOWORD(result));<br>+    ok(HIWORD(result) == 100, "Expected 100, got %d\n", HIWORD(result));<br>+<br>+    /* PBM_SETRANGE32 */<br>+    result32 = SendMessageA(hProgressWnd, PBM_SETRANGE32, 100, 0);<br>+    ok(LOWORD(result32) == 100, "Expected 0, got %d\n", LOWORD(result32));<br>+    ok(HIWORD(result32) == 0, "Expected 100, got %d\n", HIWORD(result32));<br>+<br>+}<br>+<br>+static void test_setColor(void)<br>+{<br>+    RECT client_rect;<br>+    int result, result32;<br>+    update_window(hProgressWnd);<br>+<br>+    /* PBM_SETBARCOLOR */<br>+    result = SendMessageA(hProgressWnd, PBM_SETBARCOLOR, 0, RGB(255,0,0));<br>+    ok(result == RGB(255,0,0), "expected color, since PBM_SETBARCOLOR returns 0");<br> <br>+}<br>+<br>+static void test_redraw(void)<br>+{<br>+    RECT client_rect;<br>+    int result;<br>     SendMessageA(hProgressWnd, PBM_SETRANGE, 0, MAKELPARAM(0, 100));<br>     SendMessageA(hProgressWnd, PBM_SETPOS, 10, 0);<br>     SendMessageA(hProgressWnd, PBM_SETSTEP, 20, 0);<br>     update_window(hProgressWnd);<br> <br>+    /* PBM_GETPOS */<br>+    SendMessageA(hProgressWnd, PBM_SETPOS, 10, 0);<br>+    result = SendMessageA(hProgressWnd, PBM_GETPOS, 0, 0);<br>+    ok( result == 10, "expected 10, PBM_GETPOS must return the value of the set position\n");<br>+    <br>+    /* PBM_SETSTEP */<br>+    result = SendMessageA(hProgressWnd, PBM_SETSTEP, 20, 0);<br>+    ok(result == 20, "expected 20, since return step = wParam");<br>+<br>+<br>     /* PBM_SETPOS */<br>     ok(SendMessageA(hProgressWnd, PBM_SETPOS, 50, 0) == 10, "PBM_SETPOS must return the previous position\n");<br>     ok(!GetUpdateRect(hProgressWnd, NULL, FALSE), "PBM_SETPOS: The progress bar should be redrawn immediately\n");<br>@@ -198,8 +239,9 @@<br> START_TEST(progress)<br> {<br>     init();<br>-    <br>+    test_setRange();<br>     test_redraw();<br>     <br>     cleanup();<br> }<br>+<br><br><br></pre></div><br /><hr />Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! <a href='http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us' target='_new'>Try it!</a></body>
</html>