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
6f9724d5
Commit
6f9724d5
authored
Feb 12, 2015
by
Mark Harmstone
Committed by
Alexandre Julliard
Feb 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Use theming when drawing IP address control.
parent
ca5184f5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
1 deletion
+32
-1
ipaddress.c
dlls/comctl32/ipaddress.c
+32
-1
No files found.
dlls/comctl32/ipaddress.c
View file @
6f9724d5
...
@@ -45,6 +45,9 @@
...
@@ -45,6 +45,9 @@
#include "winnls.h"
#include "winnls.h"
#include "commctrl.h"
#include "commctrl.h"
#include "comctl32.h"
#include "comctl32.h"
#include "uxtheme.h"
#include "vsstyle.h"
#include "vssym32.h"
#include "wine/unicode.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -150,12 +153,32 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
...
@@ -150,12 +153,32 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
static
const
WCHAR
dotW
[]
=
{
'.'
,
0
};
static
const
WCHAR
dotW
[]
=
{
'.'
,
0
};
RECT
rect
,
rcPart
;
RECT
rect
,
rcPart
;
COLORREF
bgCol
,
fgCol
;
COLORREF
bgCol
,
fgCol
;
int
i
;
HTHEME
theme
;
int
i
,
state
=
ETS_NORMAL
;
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
GetClientRect
(
infoPtr
->
Self
,
&
rect
);
GetClientRect
(
infoPtr
->
Self
,
&
rect
);
theme
=
OpenThemeData
(
infoPtr
->
Self
,
WC_EDITW
);
if
(
theme
)
{
DWORD
dwStyle
=
GetWindowLongW
(
infoPtr
->
Self
,
GWL_STYLE
);
if
(
!
infoPtr
->
Enabled
)
state
=
ETS_DISABLED
;
else
if
(
dwStyle
&
ES_READONLY
)
state
=
ETS_READONLY
;
else
if
(
GetFocus
()
==
infoPtr
->
Self
)
state
=
ETS_FOCUSED
;
GetThemeColor
(
theme
,
EP_EDITTEXT
,
state
,
TMT_FILLCOLOR
,
&
bgCol
);
GetThemeColor
(
theme
,
EP_EDITTEXT
,
state
,
TMT_TEXTCOLOR
,
&
fgCol
);
if
(
IsThemeBackgroundPartiallyTransparent
(
theme
,
EP_EDITTEXT
,
state
))
DrawThemeParentBackground
(
infoPtr
->
Self
,
hdc
,
&
rect
);
DrawThemeBackground
(
theme
,
hdc
,
EP_EDITTEXT
,
state
,
&
rect
,
0
);
}
else
{
if
(
infoPtr
->
Enabled
)
{
if
(
infoPtr
->
Enabled
)
{
bgCol
=
comctl32_color
.
clrWindow
;
bgCol
=
comctl32_color
.
clrWindow
;
fgCol
=
comctl32_color
.
clrWindowText
;
fgCol
=
comctl32_color
.
clrWindowText
;
...
@@ -166,6 +189,7 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
...
@@ -166,6 +189,7 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
FillRect
(
hdc
,
&
rect
,
(
HBRUSH
)(
DWORD_PTR
)(
bgCol
+
1
));
FillRect
(
hdc
,
&
rect
,
(
HBRUSH
)(
DWORD_PTR
)(
bgCol
+
1
));
DrawEdge
(
hdc
,
&
rect
,
EDGE_SUNKEN
,
BF_RECT
|
BF_ADJUST
);
DrawEdge
(
hdc
,
&
rect
,
EDGE_SUNKEN
,
BF_RECT
|
BF_ADJUST
);
}
SetBkColor
(
hdc
,
bgCol
);
SetBkColor
(
hdc
,
bgCol
);
SetTextColor
(
hdc
,
fgCol
);
SetTextColor
(
hdc
,
fgCol
);
...
@@ -177,9 +201,16 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
...
@@ -177,9 +201,16 @@ static LRESULT IPADDRESS_Draw (const IPADDRESS_INFO *infoPtr, HDC hdc)
GetWindowRect
(
infoPtr
->
Part
[
i
+
1
].
EditHwnd
,
&
rcPart
);
GetWindowRect
(
infoPtr
->
Part
[
i
+
1
].
EditHwnd
,
&
rcPart
);
MapWindowPoints
(
0
,
infoPtr
->
Self
,
(
POINT
*
)
&
rcPart
,
2
);
MapWindowPoints
(
0
,
infoPtr
->
Self
,
(
POINT
*
)
&
rcPart
,
2
);
rect
.
right
=
rcPart
.
left
;
rect
.
right
=
rcPart
.
left
;
if
(
theme
)
DrawThemeText
(
theme
,
hdc
,
EP_EDITTEXT
,
state
,
dotW
,
1
,
DT_SINGLELINE
|
DT_CENTER
|
DT_BOTTOM
,
0
,
&
rect
);
else
DrawTextW
(
hdc
,
dotW
,
1
,
&
rect
,
DT_SINGLELINE
|
DT_CENTER
|
DT_BOTTOM
);
DrawTextW
(
hdc
,
dotW
,
1
,
&
rect
,
DT_SINGLELINE
|
DT_CENTER
|
DT_BOTTOM
);
}
}
if
(
theme
)
CloseThemeData
(
theme
);
return
0
;
return
0
;
}
}
...
...
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