Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
65a47e3d
Commit
65a47e3d
authored
May 25, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Return previously set colors for PBM_SETBKCOLOR and PBM_SETBARCOLOR.
parent
589b48e4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
2 deletions
+43
-2
progress.c
dlls/comctl32/progress.c
+10
-2
progress.c
dlls/comctl32/tests/progress.c
+33
-0
No files found.
dlls/comctl32/progress.c
View file @
65a47e3d
...
...
@@ -690,17 +690,25 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
return
infoPtr
->
CurVal
;
case
PBM_SETBARCOLOR
:
{
COLORREF
clr
=
infoPtr
->
ColorBar
;
infoPtr
->
ColorBar
=
(
COLORREF
)
lParam
;
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
return
0
;
return
clr
;
}
case
PBM_GETBARCOLOR
:
return
infoPtr
->
ColorBar
;
case
PBM_SETBKCOLOR
:
{
COLORREF
clr
=
infoPtr
->
ColorBk
;
infoPtr
->
ColorBk
=
(
COLORREF
)
lParam
;
InvalidateRect
(
hwnd
,
NULL
,
TRUE
);
return
0
;
return
clr
;
}
case
PBM_GETBKCOLOR
:
return
infoPtr
->
ColorBk
;
...
...
dlls/comctl32/tests/progress.c
View file @
65a47e3d
...
...
@@ -32,6 +32,11 @@
static
HWND
hProgressParentWnd
,
hProgressWnd
;
static
const
char
progressTestClass
[]
=
"ProgressBarTestClass"
;
static
HWND
create_progress
(
DWORD
style
)
{
return
CreateWindowExA
(
0
,
PROGRESS_CLASSA
,
""
,
WS_VISIBLE
|
style
,
0
,
0
,
100
,
20
,
NULL
,
NULL
,
GetModuleHandleA
(
NULL
),
0
);
}
/* try to make sure pending X events have been processed before continuing */
static
void
flush_events
(
void
)
...
...
@@ -224,12 +229,40 @@ static void test_redraw(void)
ok
(
erased
,
"Progress bar should have erased the background
\n
"
);
}
static
void
test_setcolors
(
void
)
{
HWND
progress
;
COLORREF
clr
;
progress
=
create_progress
(
PBS_SMOOTH
);
clr
=
SendMessageA
(
progress
,
PBM_SETBARCOLOR
,
0
,
0
);
ok
(
clr
==
CLR_DEFAULT
,
"got %x
\n
"
,
clr
);
clr
=
SendMessageA
(
progress
,
PBM_SETBARCOLOR
,
0
,
RGB
(
0
,
255
,
0
));
ok
(
clr
==
0
,
"got %x
\n
"
,
clr
);
clr
=
SendMessageA
(
progress
,
PBM_SETBARCOLOR
,
0
,
CLR_DEFAULT
);
ok
(
clr
==
RGB
(
0
,
255
,
0
),
"got %x
\n
"
,
clr
);
clr
=
SendMessageA
(
progress
,
PBM_SETBKCOLOR
,
0
,
0
);
ok
(
clr
==
CLR_DEFAULT
,
"got %x
\n
"
,
clr
);
clr
=
SendMessageA
(
progress
,
PBM_SETBKCOLOR
,
0
,
RGB
(
255
,
0
,
0
));
ok
(
clr
==
0
,
"got %x
\n
"
,
clr
);
clr
=
SendMessageA
(
progress
,
PBM_SETBKCOLOR
,
0
,
CLR_DEFAULT
);
ok
(
clr
==
RGB
(
255
,
0
,
0
),
"got %x
\n
"
,
clr
);
DestroyWindow
(
progress
);
}
START_TEST
(
progress
)
{
init
();
test_redraw
();
test_setcolors
();
cleanup
();
}
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