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
7b685854
Commit
7b685854
authored
Mar 03, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Strip leading text style label from control text before lookup in binary table.
parent
1b8ba253
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
17 deletions
+44
-17
dialog.c
dlls/msi/dialog.c
+44
-17
No files found.
dlls/msi/dialog.c
View file @
7b685854
...
...
@@ -801,11 +801,31 @@ static UINT msi_dialog_text_control( msi_dialog *dialog, MSIRECORD *rec )
return
ERROR_SUCCESS
;
}
/* strip any leading text style label from text field */
static
WCHAR
*
msi_get_binary_name
(
MSIPACKAGE
*
package
,
MSIRECORD
*
rec
)
{
WCHAR
*
p
,
*
text
;
text
=
msi_get_deformatted_field
(
package
,
rec
,
10
);
if
(
!
text
)
return
NULL
;
p
=
text
;
while
(
*
p
&&
*
p
!=
'{'
)
p
++
;
if
(
!*
p
++
)
return
text
;
while
(
*
p
&&
*
p
!=
'}'
)
p
++
;
if
(
!*
p
++
)
return
text
;
p
=
strdupW
(
p
);
msi_free
(
text
);
return
p
;
}
static
UINT
msi_dialog_button_control
(
msi_dialog
*
dialog
,
MSIRECORD
*
rec
)
{
msi_control
*
control
;
UINT
attributes
,
style
;
LPWSTR
text
;
TRACE
(
"%p %p
\n
"
,
dialog
,
rec
);
...
...
@@ -820,12 +840,19 @@ static UINT msi_dialog_button_control( msi_dialog *dialog, MSIRECORD *rec )
control
->
handler
=
msi_dialog_button_handler
;
/* set the icon */
text
=
msi_get_deformatted_field
(
dialog
->
package
,
rec
,
10
);
control
->
hIcon
=
msi_load_icon
(
dialog
->
package
->
db
,
text
,
attributes
);
if
(
attributes
&
msidbControlAttributesIcon
)
SendMessageW
(
control
->
hwnd
,
BM_SETIMAGE
,
IMAGE_ICON
,
(
LPARAM
)
control
->
hIcon
);
msi_free
(
text
);
if
(
attributes
&
msidbControlAttributesIcon
)
{
/* set the icon */
LPWSTR
name
=
msi_get_binary_name
(
dialog
->
package
,
rec
);
control
->
hIcon
=
msi_load_icon
(
dialog
->
package
->
db
,
name
,
attributes
);
if
(
control
->
hIcon
)
{
SendMessageW
(
control
->
hwnd
,
BM_SETIMAGE
,
IMAGE_ICON
,
(
LPARAM
)
control
->
hIcon
);
}
else
ERR
(
"Failed to load icon %s
\n
"
,
debugstr_w
(
name
));
msi_free
(
name
);
}
return
ERROR_SUCCESS
;
}
...
...
@@ -1142,7 +1169,7 @@ static UINT msi_dialog_bitmap_control( msi_dialog *dialog, MSIRECORD *rec )
{
UINT
cx
,
cy
,
flags
,
style
,
attributes
;
msi_control
*
control
;
LPWSTR
text
;
LPWSTR
name
;
flags
=
LR_LOADFROMFILE
;
style
=
SS_BITMAP
|
SS_LEFT
|
WS_GROUP
;
...
...
@@ -1160,15 +1187,15 @@ static UINT msi_dialog_bitmap_control( msi_dialog *dialog, MSIRECORD *rec )
cx
=
msi_dialog_scale_unit
(
dialog
,
cx
);
cy
=
msi_dialog_scale_unit
(
dialog
,
cy
);
text
=
msi_get_deformatted_field
(
dialog
->
package
,
rec
,
10
);
control
->
hBitmap
=
msi_load_picture
(
dialog
->
package
->
db
,
text
,
cx
,
cy
,
flags
);
name
=
msi_get_binary_name
(
dialog
->
package
,
rec
);
control
->
hBitmap
=
msi_load_picture
(
dialog
->
package
->
db
,
name
,
cx
,
cy
,
flags
);
if
(
control
->
hBitmap
)
SendMessageW
(
control
->
hwnd
,
STM_SETIMAGE
,
IMAGE_BITMAP
,
(
LPARAM
)
control
->
hBitmap
);
else
ERR
(
"Failed to load bitmap %s
\n
"
,
debugstr_w
(
text
));
ERR
(
"Failed to load bitmap %s
\n
"
,
debugstr_w
(
name
));
msi_free
(
text
);
msi_free
(
name
);
return
ERROR_SUCCESS
;
}
...
...
@@ -1177,7 +1204,7 @@ static UINT msi_dialog_icon_control( msi_dialog *dialog, MSIRECORD *rec )
{
msi_control
*
control
;
DWORD
attributes
;
LPWSTR
text
;
LPWSTR
name
;
TRACE
(
"
\n
"
);
...
...
@@ -1185,13 +1212,13 @@ static UINT msi_dialog_icon_control( msi_dialog *dialog, MSIRECORD *rec )
SS_ICON
|
SS_CENTERIMAGE
|
WS_GROUP
);
attributes
=
MSI_RecordGetInteger
(
rec
,
8
);
text
=
msi_get_deformatted_field
(
dialog
->
package
,
rec
,
10
);
control
->
hIcon
=
msi_load_icon
(
dialog
->
package
->
db
,
text
,
attributes
);
name
=
msi_get_binary_name
(
dialog
->
package
,
rec
);
control
->
hIcon
=
msi_load_icon
(
dialog
->
package
->
db
,
name
,
attributes
);
if
(
control
->
hIcon
)
SendMessageW
(
control
->
hwnd
,
STM_SETICON
,
(
WPARAM
)
control
->
hIcon
,
0
);
else
ERR
(
"Failed to load bitmap %s
\n
"
,
debugstr_w
(
text
));
msi_free
(
text
);
ERR
(
"Failed to load bitmap %s
\n
"
,
debugstr_w
(
name
));
msi_free
(
name
);
return
ERROR_SUCCESS
;
}
...
...
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