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
8967e87c
Commit
8967e87c
authored
May 24, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/taskdialog: Display content text label.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
980754bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
taskdialog.c
dlls/comctl32/taskdialog.c
+22
-11
No files found.
dlls/comctl32/taskdialog.c
View file @
8967e87c
...
...
@@ -47,6 +47,7 @@ static const UINT DIALOG_BUTTON_WIDTH = 50;
static
const
UINT
DIALOG_BUTTON_HEIGHT
=
14
;
static
const
UINT
ID_MAIN_INSTRUCTION
=
0xf000
;
static
const
UINT
ID_CONTENT
=
0xf001
;
struct
taskdialog_control
{
...
...
@@ -134,7 +135,7 @@ static unsigned int taskdialog_add_control(struct taskdialog_template_desc *desc
return
ALIGNED_LENGTH
(
size
,
3
);
}
static
unsigned
int
taskdialog_add_
main_instruction
(
struct
taskdialog_template_desc
*
desc
)
static
unsigned
int
taskdialog_add_
static_label
(
struct
taskdialog_template_desc
*
desc
,
WORD
id
,
const
WCHAR
*
str
)
{
RECT
rect
=
{
0
,
0
,
desc
->
dialog_width
-
DIALOG_SPACING
*
2
,
0
};
/* padding left and right of the control */
const
WCHAR
*
textW
=
NULL
;
...
...
@@ -142,21 +143,20 @@ static unsigned int taskdialog_add_main_instruction(struct taskdialog_template_d
HFONT
oldfont
;
HDC
hdc
;
if
(
!
desc
->
taskconfig
->
pszMainInstruction
)
if
(
!
str
)
return
0
;
if
(
IS_INTRESOURCE
(
desc
->
taskconfig
->
pszMainInstruction
))
if
(
IS_INTRESOURCE
(
str
))
{
if
(
!
(
length
=
LoadStringW
(
desc
->
taskconfig
->
hInstance
,
(
UINT_PTR
)
desc
->
taskconfig
->
pszMainInstruction
,
(
WCHAR
*
)
&
textW
,
0
)))
if
(
!
(
length
=
LoadStringW
(
desc
->
taskconfig
->
hInstance
,
(
UINT_PTR
)
str
,
(
WCHAR
*
)
&
textW
,
0
)))
{
WARN
(
"Failed to load
main instruction text
\n
"
);
WARN
(
"Failed to load
static text %s, id %#x
\n
"
,
debugstr_w
(
str
),
id
);
return
0
;
}
}
else
{
textW
=
desc
->
taskconfig
->
pszMainInstruction
;
textW
=
str
;
length
=
strlenW
(
textW
);
}
...
...
@@ -170,13 +170,23 @@ static unsigned int taskdialog_add_main_instruction(struct taskdialog_template_d
SelectObject
(
hdc
,
oldfont
);
ReleaseDC
(
0
,
hdc
);
size
=
taskdialog_add_control
(
desc
,
ID_MAIN_INSTRUCTION
,
WC_STATICW
,
desc
->
taskconfig
->
hInstance
,
desc
->
taskconfig
->
pszMainInstruction
,
DIALOG_SPACING
,
desc
->
dialog_height
,
rect
.
right
,
rect
.
bottom
);
desc
->
dialog_height
+=
DIALOG_SPACING
;
size
=
taskdialog_add_control
(
desc
,
id
,
WC_STATICW
,
desc
->
taskconfig
->
hInstance
,
str
,
DIALOG_SPACING
,
desc
->
dialog_height
,
rect
.
right
,
rect
.
bottom
);
desc
->
dialog_height
+=
rect
.
bottom
;
return
size
;
}
static
unsigned
int
taskdialog_add_main_instruction
(
struct
taskdialog_template_desc
*
desc
)
{
return
taskdialog_add_static_label
(
desc
,
ID_MAIN_INSTRUCTION
,
desc
->
taskconfig
->
pszMainInstruction
);
}
static
unsigned
int
taskdialog_add_content
(
struct
taskdialog_template_desc
*
desc
)
{
return
taskdialog_add_static_label
(
desc
,
ID_CONTENT
,
desc
->
taskconfig
->
pszContent
);
}
static
unsigned
int
taskdialog_add_common_buttons
(
struct
taskdialog_template_desc
*
desc
)
{
short
button_x
=
desc
->
dialog_width
-
DIALOG_BUTTON_WIDTH
-
DIALOG_SPACING
;
...
...
@@ -289,11 +299,12 @@ static DLGTEMPLATE *create_taskdialog_template(const TASKDIALOGCONFIG *taskconfi
screen_width
=
taskdialog_get_reference_rect
(
&
desc
,
&
ref_rect
);
desc
.
dialog_height
=
DIALOG_SPACING
;
desc
.
dialog_height
=
0
;
desc
.
dialog_width
=
max
(
taskconfig
->
cxWidth
,
DIALOG_MIN_WIDTH
);
desc
.
dialog_width
=
min
(
desc
.
dialog_width
,
screen_width
);
size
+=
taskdialog_add_main_instruction
(
&
desc
);
size
+=
taskdialog_add_content
(
&
desc
);
size
+=
taskdialog_add_common_buttons
(
&
desc
);
template
=
Alloc
(
size
);
...
...
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