Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
ce91a287
Commit
ce91a287
authored
Oct 19, 2013
by
Saulius Krasuckas
Committed by
Alexandre Julliard
Nov 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tests: Make progress.c compile with -D__WINESRC__.
parent
9c8d4a94
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
progress.c
dlls/comctl32/tests/progress.c
+11
-11
No files found.
dlls/comctl32/tests/progress.c
View file @
ce91a287
...
...
@@ -48,12 +48,12 @@ static void flush_events(void)
while
(
diff
>
0
)
{
if
(
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
min
(
10
,
diff
),
QS_ALLINPUT
)
==
WAIT_TIMEOUT
)
break
;
while
(
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessage
(
&
msg
);
while
(
PeekMessage
A
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
diff
=
time
-
GetTickCount
();
}
}
static
LRESULT
CALLBACK
ProgressTestWndP
roc
(
HWND
hWnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
LRESULT
CALLBACK
progress_test_wnd_p
roc
(
HWND
hWnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
switch
(
msg
)
{
...
...
@@ -72,7 +72,7 @@ static WNDPROC progress_wndproc;
static
BOOL
erased
;
static
RECT
last_paint_rect
;
static
LRESULT
CALLBACK
ProgressSubclassP
roc
(
HWND
hWnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
LRESULT
CALLBACK
progress_subclass_p
roc
(
HWND
hWnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
if
(
msg
==
WM_PAINT
)
{
...
...
@@ -82,7 +82,7 @@ static LRESULT CALLBACK ProgressSubclassProc(HWND hWnd, UINT msg, WPARAM wParam,
{
erased
=
TRUE
;
}
return
CallWindowProc
(
progress_wndproc
,
hWnd
,
msg
,
wParam
,
lParam
);
return
CallWindowProc
A
(
progress_wndproc
,
hWnd
,
msg
,
wParam
,
lParam
);
}
...
...
@@ -117,11 +117,11 @@ static void init(void)
wc
.
cbWndExtra
=
0
;
wc
.
hInstance
=
GetModuleHandleA
(
NULL
);
wc
.
hIcon
=
NULL
;
wc
.
hCursor
=
LoadCursorA
(
NULL
,
IDC_ARROW
);
wc
.
hCursor
=
LoadCursorA
(
NULL
,
(
LPCSTR
)
IDC_ARROW
);
wc
.
hbrBackground
=
GetSysColorBrush
(
COLOR_WINDOW
);
wc
.
lpszMenuName
=
NULL
;
wc
.
lpszClassName
=
progressTestClass
;
wc
.
lpfnWndProc
=
ProgressTestWndP
roc
;
wc
.
lpfnWndProc
=
progress_test_wnd_p
roc
;
RegisterClassA
(
&
wc
);
rect
.
left
=
0
;
...
...
@@ -135,10 +135,10 @@ static void init(void)
assert
(
hProgressParentWnd
!=
NULL
);
GetClientRect
(
hProgressParentWnd
,
&
rect
);
hProgressWnd
=
CreateWindowEx
(
0
,
PROGRESS_CLASS
,
""
,
WS_CHILD
|
WS_VISIBLE
,
hProgressWnd
=
CreateWindowEx
A
(
0
,
PROGRESS_CLASSA
,
""
,
WS_CHILD
|
WS_VISIBLE
,
0
,
0
,
rect
.
right
,
rect
.
bottom
,
hProgressParentWnd
,
NULL
,
GetModuleHandleA
(
NULL
),
0
);
assert
(
hProgressWnd
!=
NULL
);
progress_wndproc
=
(
WNDPROC
)
SetWindowLongPtr
(
hProgressWnd
,
GWLP_WNDPROC
,
(
LPARAM
)
ProgressSubclassP
roc
);
progress_wndproc
=
(
WNDPROC
)
SetWindowLongPtr
A
(
hProgressWnd
,
GWLP_WNDPROC
,
(
LPARAM
)
progress_subclass_p
roc
);
ShowWindow
(
hProgressParentWnd
,
SW_SHOWNORMAL
);
ok
(
GetUpdateRect
(
hProgressParentWnd
,
NULL
,
FALSE
),
"GetUpdateRect: There should be a region that needs to be updated
\n
"
);
...
...
@@ -201,13 +201,13 @@ static void test_redraw(void)
position is not in the new range, it does.
Don't test this, it may change in future Windows versions. */
SendMessage
(
hProgressWnd
,
PBM_SETPOS
,
0
,
0
);
SendMessage
A
(
hProgressWnd
,
PBM_SETPOS
,
0
,
0
);
update_window
(
hProgressWnd
);
/* increase to 10 - no background erase required */
erased
=
FALSE
;
SetRectEmpty
(
&
last_paint_rect
);
SendMessage
(
hProgressWnd
,
PBM_SETPOS
,
10
,
0
);
SendMessage
A
(
hProgressWnd
,
PBM_SETPOS
,
10
,
0
);
GetClientRect
(
hProgressWnd
,
&
client_rect
);
ok
(
EqualRect
(
&
last_paint_rect
,
&
client_rect
),
"last_paint_rect was { %d, %d, %d, %d } instead of { %d, %d, %d, %d }
\n
"
,
...
...
@@ -219,7 +219,7 @@ static void test_redraw(void)
/* decrease to 0 - background erase will be required */
erased
=
FALSE
;
SetRectEmpty
(
&
last_paint_rect
);
SendMessage
(
hProgressWnd
,
PBM_SETPOS
,
0
,
0
);
SendMessage
A
(
hProgressWnd
,
PBM_SETPOS
,
0
,
0
);
GetClientRect
(
hProgressWnd
,
&
client_rect
);
ok
(
EqualRect
(
&
last_paint_rect
,
&
client_rect
),
"last_paint_rect was { %d, %d, %d, %d } instead of { %d, %d, %d, %d }
\n
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment