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
4fd668d0
Commit
4fd668d0
authored
Mar 03, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace some instances of LoadStringA by LoadStringW.
parent
28d29300
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
40 deletions
+37
-40
printdlg.c
dlls/comdlg32/printdlg.c
+9
-12
insobjdlg.c
dlls/oledlg/insobjdlg.c
+17
-17
ui.c
dlls/sane.ds/ui.c
+11
-11
No files found.
dlls/comdlg32/printdlg.c
View file @
4fd668d0
...
...
@@ -308,15 +308,12 @@ static BOOL PRINTDLG_UpdatePrintDlgA(HWND hDlg,
nToPage
=
GetDlgItemInt
(
hDlg
,
edt2
,
NULL
,
FALSE
);
if
(
nFromPage
<
lppd
->
nMinPage
||
nFromPage
>
lppd
->
nMaxPage
||
nToPage
<
lppd
->
nMinPage
||
nToPage
>
lppd
->
nMaxPage
)
{
char
resourcestr
[
256
];
char
resultstr
[
256
];
LoadStringA
(
COMDLG32_hInstance
,
PD32_INVALID_PAGE_RANGE
,
resourcestr
,
255
);
sprintf
(
resultstr
,
resourcestr
,
lppd
->
nMinPage
,
lppd
->
nMaxPage
);
LoadStringA
(
COMDLG32_hInstance
,
PD32_PRINT_TITLE
,
resourcestr
,
255
);
MessageBoxA
(
hDlg
,
resultstr
,
resourcestr
,
MB_OK
|
MB_ICONWARNING
);
WCHAR
resourcestr
[
256
];
WCHAR
resultstr
[
256
];
LoadStringW
(
COMDLG32_hInstance
,
PD32_INVALID_PAGE_RANGE
,
resourcestr
,
255
);
wsprintfW
(
resultstr
,
resourcestr
,
lppd
->
nMinPage
,
lppd
->
nMaxPage
);
LoadStringW
(
COMDLG32_hInstance
,
PD32_PRINT_TITLE
,
resourcestr
,
255
);
MessageBoxW
(
hDlg
,
resultstr
,
resourcestr
,
MB_OK
|
MB_ICONWARNING
);
return
FALSE
;
}
lppd
->
nFromPage
=
nFromPage
;
...
...
@@ -3569,9 +3566,9 @@ BOOL WINAPI PageSetupDlgA(LPPAGESETUPDLGA setupdlg) {
bRet
=
PrintDlgA
(
&
pdlg
);
if
(
!
bRet
){
if
(
!
(
setupdlg
->
Flags
&
PSD_NOWARNING
))
{
char
errstr
[
256
];
LoadString
A
(
COMDLG32_hInstance
,
PD32_NO_DEFAULT_PRINTER
,
errstr
,
255
);
MessageBox
A
(
setupdlg
->
hwndOwner
,
errstr
,
0
,
MB_OK
|
MB_ICONERROR
);
WCHAR
errstr
[
256
];
LoadString
W
(
COMDLG32_hInstance
,
PD32_NO_DEFAULT_PRINTER
,
errstr
,
255
);
MessageBox
W
(
setupdlg
->
hwndOwner
,
errstr
,
0
,
MB_OK
|
MB_ICONERROR
);
}
return
FALSE
;
}
...
...
dlls/oledlg/insobjdlg.c
View file @
4fd668d0
...
...
@@ -305,7 +305,7 @@ static void UIINSERTOBJECTDLG_SelectCreateNew(InsertObjectDlgInfo* pdlgInfo)
*/
static
void
UIINSERTOBJECTDLG_SelectCreateFromFile
(
InsertObjectDlgInfo
*
pdlgInfo
)
{
char
resstr
[
MAX_PATH
];
WCHAR
resstr
[
MAX_PATH
];
ShowWindow
(
pdlgInfo
->
hwndAddCtrlBTN
,
SW_HIDE
);
ShowWindow
(
pdlgInfo
->
hwndObjTypeLBL
,
SW_HIDE
);
...
...
@@ -318,10 +318,10 @@ static void UIINSERTOBJECTDLG_SelectCreateFromFile(InsertObjectDlgInfo* pdlgInfo
ShowWindow
(
pdlgInfo
->
hwndFileTB
,
SW_SHOW
);
ShowWindow
(
pdlgInfo
->
hwndBrowseBTN
,
SW_SHOW
);
SendMessage
A
(
pdlgInfo
->
hwndCreateFromFileCB
,
BM_SETCHECK
,
BST_CHECKED
,
0
);
SendMessage
W
(
pdlgInfo
->
hwndCreateFromFileCB
,
BM_SETCHECK
,
BST_CHECKED
,
0
);
if
(
LoadString
A
(
OLEDLG_hInstance
,
IDS_RESULTFILEOBJDESC
,
resstr
,
MAX_PATH
))
SendMessage
A
(
pdlgInfo
->
hwndResultDesc
,
WM_SETTEXT
,
0
,
(
LPARAM
)
resstr
);
if
(
LoadString
W
(
OLEDLG_hInstance
,
IDS_RESULTFILEOBJDESC
,
resstr
,
MAX_PATH
))
SendMessage
W
(
pdlgInfo
->
hwndResultDesc
,
WM_SETTEXT
,
0
,
(
LPARAM
)
resstr
);
}
...
...
@@ -418,20 +418,20 @@ static void UIINSERTOBJECTDLG_FreeObjectTypes(InsertObjectDlgInfo* pdlgInfo)
static
void
UIINSERTOBJECTDLG_SelChange
(
InsertObjectDlgInfo
*
pdlgInfo
)
{
INT
index
;
CHAR
objname
[
MAX_PATH
];
CHAR
objdesc
[
MAX_PATH
];
CHAR
resstr
[
MAX_PATH
];
W
CHAR
objname
[
MAX_PATH
];
W
CHAR
objdesc
[
MAX_PATH
];
W
CHAR
resstr
[
MAX_PATH
];
TRACE
(
"
\n
"
);
if
(
LoadString
A
(
OLEDLG_hInstance
,
IDS_RESULTOBJDESC
,
resstr
,
MAX_PATH
)
&&
((
index
=
SendMessage
A
(
pdlgInfo
->
hwndObjTypeLB
,
LB_GETCURSEL
,
0
,
0
))
>=
0
)
&&
SendMessage
A
(
pdlgInfo
->
hwndObjTypeLB
,
LB_GETTEXT
,
(
WPARAM
)
index
,
(
LPARAM
)
objname
))
sprintf
(
objdesc
,
resstr
,
objname
);
if
(
LoadString
W
(
OLEDLG_hInstance
,
IDS_RESULTOBJDESC
,
resstr
,
MAX_PATH
)
&&
((
index
=
SendMessage
W
(
pdlgInfo
->
hwndObjTypeLB
,
LB_GETCURSEL
,
0
,
0
))
>=
0
)
&&
SendMessage
W
(
pdlgInfo
->
hwndObjTypeLB
,
LB_GETTEXT
,
(
WPARAM
)
index
,
(
LPARAM
)
objname
))
wsprintfW
(
objdesc
,
resstr
,
objname
);
else
objdesc
[
0
]
=
0
;
SendMessage
A
(
pdlgInfo
->
hwndResultDesc
,
WM_SETTEXT
,
0
,
(
LPARAM
)
objdesc
);
SendMessage
W
(
pdlgInfo
->
hwndResultDesc
,
WM_SETTEXT
,
0
,
(
LPARAM
)
objdesc
);
}
...
...
@@ -615,13 +615,13 @@ static void UIINSERTOBJECTDLG_AddControl(InsertObjectDlgInfo* pdlgInfo)
if
(
!
bValid
)
{
char
title
[
32
];
char
msg
[
256
];
WCHAR
title
[
32
];
WCHAR
msg
[
256
];
LoadString
A
(
OLEDLG_hInstance
,
IDS_NOTOLEMODCAPTION
,
title
,
32
);
LoadString
A
(
OLEDLG_hInstance
,
IDS_NOTOLEMOD
,
msg
,
256
);
LoadString
W
(
OLEDLG_hInstance
,
IDS_NOTOLEMODCAPTION
,
title
,
32
);
LoadString
W
(
OLEDLG_hInstance
,
IDS_NOTOLEMOD
,
msg
,
256
);
MessageBox
A
(
pdlgInfo
->
hwndSelf
,
msg
,
title
,
MB_ICONEXCLAMATION
);
MessageBox
W
(
pdlgInfo
->
hwndSelf
,
msg
,
title
,
MB_ICONEXCLAMATION
);
}
}
}
dlls/sane.ds/ui.c
View file @
4fd668d0
...
...
@@ -608,14 +608,13 @@ BOOL DoScannerUI(void)
static
void
UpdateRelevantEdit
(
HWND
hwnd
,
const
SANE_Option_Descriptor
*
opt
,
int
index
,
int
position
)
{
CHAR
buffer
[
244
];
W
CHAR
buffer
[
244
];
HWND
edit_w
;
CHAR
unit
[
20
];
LoadStringA
(
SANE_instance
,
opt
->
unit
,
unit
,
20
);
int
len
;
if
(
opt
->
type
==
SANE_TYPE_INT
)
{
static
const
WCHAR
formatW
[]
=
{
'%'
,
'i'
,
0
};
INT
si
;
if
(
opt
->
constraint
.
range
->
quant
)
...
...
@@ -623,11 +622,11 @@ static void UpdateRelevantEdit(HWND hwnd, const SANE_Option_Descriptor *opt,
else
si
=
position
;
sprintf
(
buffer
,
"%i %s"
,
si
,
unit
);
len
=
wsprintfW
(
buffer
,
formatW
,
si
);
}
else
if
(
opt
->
type
==
SANE_TYPE_FIXED
)
{
static
const
WCHAR
formatW
[]
=
{
'%'
,
'f'
,
0
};
double
s_quant
,
dd
;
s_quant
=
SANE_UNFIX
(
opt
->
constraint
.
range
->
quant
);
...
...
@@ -637,14 +636,15 @@ static void UpdateRelevantEdit(HWND hwnd, const SANE_Option_Descriptor *opt,
else
dd
=
position
*
0
.
01
;
sprintf
(
buffer
,
"%f %s"
,
dd
,
unit
);
len
=
wsprintfW
(
buffer
,
formatW
,
dd
);
}
else
buffer
[
0
]
=
0
;
else
return
;
buffer
[
len
++
]
=
' '
;
LoadStringW
(
SANE_instance
,
opt
->
unit
,
buffer
+
len
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
)
-
len
);
edit_w
=
GetDlgItem
(
hwnd
,
index
+
ID_BASE
+
ID_EDIT_BASE
);
if
(
edit_w
&&
buffer
[
0
])
SetWindowTextA
(
edit_w
,
buffer
);
if
(
edit_w
)
SetWindowTextW
(
edit_w
,
buffer
);
}
...
...
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