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
4899a500
Commit
4899a500
authored
May 09, 2005
by
Felix Nawothnig
Committed by
Alexandre Julliard
May 09, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented WM_ENABLE.
parent
70fe39e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
ipaddress.c
dlls/comctl32/ipaddress.c
+34
-0
No files found.
dlls/comctl32/ipaddress.c
View file @
4899a500
...
...
@@ -62,6 +62,7 @@ typedef struct
{
HWND
Self
;
HWND
Notify
;
BOOL
Enabled
;
IPPART_INFO
Part
[
4
];
}
IPADDRESS_INFO
;
...
...
@@ -127,12 +128,26 @@ static LRESULT IPADDRESS_Draw (IPADDRESS_INFO *infoPtr, HDC hdc)
static
const
WCHAR
dotW
[]
=
{
'.'
,
0
};
RECT
rect
,
rcPart
;
POINT
pt
;
COLORREF
bgCol
,
fgCol
;
int
i
;
TRACE
(
"
\n
"
);
GetClientRect
(
infoPtr
->
Self
,
&
rect
);
if
(
infoPtr
->
Enabled
)
{
bgCol
=
COLOR_WINDOW
;
fgCol
=
COLOR_WINDOWTEXT
;
}
else
{
bgCol
=
COLOR_3DFACE
;
fgCol
=
COLOR_GRAYTEXT
;
}
FillRect
(
hdc
,
&
rect
,
(
HBRUSH
)
(
bgCol
+
1
));
DrawEdge
(
hdc
,
&
rect
,
EDGE_SUNKEN
,
BF_RECT
|
BF_ADJUST
);
SetBkColor
(
hdc
,
GetSysColor
(
bgCol
));
SetTextColor
(
hdc
,
GetSysColor
(
fgCol
));
for
(
i
=
0
;
i
<
3
;
i
++
)
{
GetWindowRect
(
infoPtr
->
Part
[
i
].
EditHwnd
,
&
rcPart
);
...
...
@@ -174,6 +189,7 @@ static LRESULT IPADDRESS_Create (HWND hwnd, LPCREATESTRUCTA lpCreate)
edit
.
bottom
=
rcClient
.
bottom
-
2
;
infoPtr
->
Self
=
hwnd
;
infoPtr
->
Enabled
=
FALSE
;
infoPtr
->
Notify
=
lpCreate
->
hwndParent
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
...
...
@@ -215,6 +231,20 @@ static LRESULT IPADDRESS_Destroy (IPADDRESS_INFO *infoPtr)
}
static
LRESULT
IPADDRESS_Enable
(
IPADDRESS_INFO
*
infoPtr
,
BOOL
enabled
)
{
int
i
;
infoPtr
->
Enabled
=
enabled
;
for
(
i
=
0
;
i
<
4
;
i
++
)
EnableWindow
(
infoPtr
->
Part
[
i
].
EditHwnd
,
enabled
);
InvalidateRgn
(
infoPtr
->
Self
,
NULL
,
FALSE
);
return
0
;
}
static
LRESULT
IPADDRESS_Paint
(
IPADDRESS_INFO
*
infoPtr
,
HDC
hdc
)
{
PAINTSTRUCT
ps
;
...
...
@@ -517,6 +547,10 @@ IPADDRESS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
WM_DESTROY
:
return
IPADDRESS_Destroy
(
infoPtr
);
case
WM_ENABLE
:
return
IPADDRESS_Enable
(
infoPtr
,
(
BOOL
)
wParam
);
break
;
case
WM_PAINT
:
return
IPADDRESS_Paint
(
infoPtr
,
(
HDC
)
wParam
);
...
...
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