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
0c0f80a3
Commit
0c0f80a3
authored
Feb 01, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Removed useless casts to long.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8e3d4910
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
colordlg.c
dlls/comdlg32/colordlg.c
+9
-12
No files found.
dlls/comdlg32/colordlg.c
View file @
0c0f80a3
...
...
@@ -340,7 +340,7 @@ static BOOL CC_MouseCheckColorGraph( HWND hDlg, int dlgitem, int *hori, int *ver
HWND
hwnd
;
POINT
point
;
RECT
rect
;
long
x
,
y
;
int
x
,
y
;
CONV_LPARAMTOPOINT
(
lParam
,
&
point
);
ClientToScreen
(
hDlg
,
&
point
);
...
...
@@ -353,10 +353,8 @@ static BOOL CC_MouseCheckColorGraph( HWND hDlg, int dlgitem, int *hori, int *ver
GetClientRect
(
hwnd
,
&
rect
);
ScreenToClient
(
hwnd
,
&
point
);
x
=
(
long
)
point
.
x
*
MAXHORI
;
x
/=
rect
.
right
;
y
=
(
long
)
(
rect
.
bottom
-
point
.
y
)
*
MAXVERT
;
y
/=
rect
.
bottom
;
x
=
(
point
.
x
*
MAXHORI
)
/
rect
.
right
;
y
=
((
rect
.
bottom
-
point
.
y
)
*
MAXVERT
)
/
rect
.
bottom
;
if
(
x
<
0
)
x
=
0
;
if
(
y
<
0
)
y
=
0
;
...
...
@@ -398,7 +396,6 @@ static BOOL CC_MouseCheckResultWindow( HWND hDlg, LPARAM lParam )
static
int
CC_CheckDigitsInEdit
(
HWND
hwnd
,
int
maxval
)
{
int
i
,
k
,
m
,
result
,
value
;
long
editpos
;
char
buffer
[
30
];
GetWindowTextA
(
hwnd
,
buffer
,
ARRAY_SIZE
(
buffer
));
...
...
@@ -425,7 +422,7 @@ static int CC_CheckDigitsInEdit( HWND hwnd, int maxval )
}
if
(
result
)
{
editpos
=
SendMessageA
(
hwnd
,
EM_GETSEL
,
0
,
0
);
LRESULT
editpos
=
SendMessageA
(
hwnd
,
EM_GETSEL
,
0
,
0
);
SetWindowTextA
(
hwnd
,
buffer
);
SendMessageA
(
hwnd
,
EM_SETSEL
,
0
,
editpos
);
}
...
...
@@ -465,7 +462,7 @@ static void CC_PaintSelectedColor(const CCPRIV *infoPtr)
static
void
CC_PaintTriangle
(
CCPRIV
*
infoPtr
)
{
HDC
hDC
;
long
temp
;
int
temp
;
int
w
=
LOWORD
(
GetDialogBaseUnits
())
/
2
;
POINT
points
[
3
];
int
height
;
...
...
@@ -485,9 +482,9 @@ static void CC_PaintTriangle(CCPRIV *infoPtr)
ScreenToClient
(
infoPtr
->
hwndSelf
,
points
);
/* |< | */
oben
=
points
[
0
].
y
;
/* | \ | */
/* | \| */
temp
=
(
long
)
height
*
(
long
)
infoPtr
->
l
;
temp
=
height
*
infoPtr
->
l
;
points
[
0
].
x
+=
1
;
points
[
0
].
y
=
oben
+
height
-
temp
/
(
long
)
MAXVERT
;
points
[
0
].
y
=
oben
+
height
-
temp
/
MAXVERT
;
points
[
1
].
y
=
points
[
0
].
y
+
w
;
points
[
2
].
y
=
points
[
0
].
y
-
w
;
points
[
2
].
x
=
points
[
1
].
x
=
points
[
0
].
x
+
w
;
...
...
@@ -536,8 +533,8 @@ static void CC_PaintCross(CCPRIV *infoPtr)
SelectClipRgn
(
hDC
,
region
);
DeleteObject
(
region
);
point
.
x
=
(
(
long
)
rect
.
right
*
(
long
)
x
)
/
(
long
)
MAXHORI
;
point
.
y
=
rect
.
bottom
-
(
(
long
)
rect
.
bottom
*
(
long
)
y
)
/
(
long
)
MAXVERT
;
point
.
x
=
(
rect
.
right
*
x
)
/
MAXHORI
;
point
.
y
=
rect
.
bottom
-
(
rect
.
bottom
*
y
)
/
MAXVERT
;
if
(
infoPtr
->
oldcross
.
left
!=
infoPtr
->
oldcross
.
right
)
BitBlt
(
hDC
,
infoPtr
->
oldcross
.
left
,
infoPtr
->
oldcross
.
top
,
infoPtr
->
oldcross
.
right
-
infoPtr
->
oldcross
.
left
,
...
...
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