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
a1b0d925
Commit
a1b0d925
authored
Oct 15, 2016
by
Carlo Bramini
Committed by
Alexandre Julliard
Oct 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Uses SetDlgItemInt() to simplify the code.
Signed-off-by:
Carlo Bramini
<
carlo_bramini@users.sourceforge.net
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b466e893
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
18 deletions
+7
-18
colordlg.c
dlls/comdlg32/colordlg.c
+6
-15
fontdlg.c
dlls/comdlg32/fontdlg.c
+1
-3
No files found.
dlls/comdlg32/colordlg.c
View file @
a1b0d925
...
...
@@ -673,15 +673,11 @@ static void CC_EditSetRGB( CCPRIV *infoPtr )
int
r
=
GetRValue
(
cr
);
int
g
=
GetGValue
(
cr
);
int
b
=
GetBValue
(
cr
);
char
buffer
[
10
];
infoPtr
->
updating
=
TRUE
;
sprintf
(
buffer
,
"%d"
,
r
);
SetWindowTextA
(
GetDlgItem
(
infoPtr
->
hwndSelf
,
IDC_COLOR_EDIT_R
),
buffer
);
sprintf
(
buffer
,
"%d"
,
g
);
SetWindowTextA
(
GetDlgItem
(
infoPtr
->
hwndSelf
,
IDC_COLOR_EDIT_G
),
buffer
);
sprintf
(
buffer
,
"%d"
,
b
);
SetWindowTextA
(
GetDlgItem
(
infoPtr
->
hwndSelf
,
IDC_COLOR_EDIT_B
),
buffer
);
SetDlgItemInt
(
infoPtr
->
hwndSelf
,
IDC_COLOR_EDIT_R
,
r
,
TRUE
);
SetDlgItemInt
(
infoPtr
->
hwndSelf
,
IDC_COLOR_EDIT_G
,
g
,
TRUE
);
SetDlgItemInt
(
infoPtr
->
hwndSelf
,
IDC_COLOR_EDIT_B
,
b
,
TRUE
);
infoPtr
->
updating
=
FALSE
;
}
}
...
...
@@ -693,15 +689,10 @@ static void CC_EditSetHSL( CCPRIV *infoPtr )
{
if
(
IsWindowVisible
(
GetDlgItem
(
infoPtr
->
hwndSelf
,
IDC_COLOR_GRAPH
)
))
/* if full size */
{
char
buffer
[
10
];
infoPtr
->
updating
=
TRUE
;
sprintf
(
buffer
,
"%d"
,
infoPtr
->
h
);
SetWindowTextA
(
GetDlgItem
(
infoPtr
->
hwndSelf
,
IDC_COLOR_EDIT_H
),
buffer
);
sprintf
(
buffer
,
"%d"
,
infoPtr
->
s
);
SetWindowTextA
(
GetDlgItem
(
infoPtr
->
hwndSelf
,
IDC_COLOR_EDIT_S
),
buffer
);
sprintf
(
buffer
,
"%d"
,
infoPtr
->
l
);
SetWindowTextA
(
GetDlgItem
(
infoPtr
->
hwndSelf
,
IDC_COLOR_EDIT_L
),
buffer
);
SetDlgItemInt
(
infoPtr
->
hwndSelf
,
IDC_COLOR_EDIT_H
,
infoPtr
->
h
,
TRUE
);
SetDlgItemInt
(
infoPtr
->
hwndSelf
,
IDC_COLOR_EDIT_S
,
infoPtr
->
s
,
TRUE
);
SetDlgItemInt
(
infoPtr
->
hwndSelf
,
IDC_COLOR_EDIT_L
,
infoPtr
->
l
,
TRUE
);
infoPtr
->
updating
=
FALSE
;
}
CC_PaintLumBar
(
infoPtr
);
...
...
dlls/comdlg32/fontdlg.c
View file @
a1b0d925
...
...
@@ -534,7 +534,6 @@ static INT AddFontStyle( const ENUMLOGFONTEXW *lpElfex, const NEWTEXTMETRICEXW *
static
void
CFn_FitFontSize
(
HWND
hDlg
,
int
points
)
{
WCHAR
buffW
[
16
];
int
i
,
n
;
/* look for fitting font size in combobox3 */
...
...
@@ -553,8 +552,7 @@ static void CFn_FitFontSize( HWND hDlg, int points)
}
/* no default matching size, set text manually */
sprintfW
(
buffW
,
fontsizefmtW
,
points
);
SetDlgItemTextW
(
hDlg
,
cmb3
,
buffW
);
SetDlgItemInt
(
hDlg
,
cmb3
,
points
,
TRUE
);
}
static
BOOL
CFn_FitFontStyle
(
HWND
hDlg
,
LONG
packedstyle
)
...
...
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