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
e2dae70f
Commit
e2dae70f
authored
Mar 29, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Mar 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Use the available ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
250e8437
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
filedlg.c
dlls/comdlg32/filedlg.c
+10
-8
No files found.
dlls/comdlg32/filedlg.c
View file @
e2dae70f
...
...
@@ -1641,7 +1641,7 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
else
if
(
fodInfos
->
DlgInfos
.
dwDlgProp
&
FODPROP_SAVEDLG
)
{
WCHAR
buf
[
64
];
LoadStringW
(
COMDLG32_hInstance
,
IDS_SAVE_AS
,
buf
,
sizeof
(
buf
)
/
sizeof
(
WCHAR
));
LoadStringW
(
COMDLG32_hInstance
,
IDS_SAVE_AS
,
buf
,
ARRAY_SIZE
(
buf
));
SetWindowTextW
(
hwnd
,
buf
);
}
...
...
@@ -1860,9 +1860,9 @@ static LRESULT FILEDLG95_InitControls(HWND hwnd)
if
(
fodInfos
->
DlgInfos
.
dwDlgProp
&
FODPROP_SAVEDLG
)
{
WCHAR
buf
[
16
];
LoadStringW
(
COMDLG32_hInstance
,
IDS_SAVE_BUTTON
,
buf
,
sizeof
(
buf
)
/
sizeof
(
WCHAR
));
LoadStringW
(
COMDLG32_hInstance
,
IDS_SAVE_BUTTON
,
buf
,
ARRAY_SIZE
(
buf
));
SetDlgItemTextW
(
hwnd
,
IDOK
,
buf
);
LoadStringW
(
COMDLG32_hInstance
,
IDS_SAVE_IN
,
buf
,
sizeof
(
buf
)
/
sizeof
(
WCHAR
));
LoadStringW
(
COMDLG32_hInstance
,
IDS_SAVE_IN
,
buf
,
ARRAY_SIZE
(
buf
));
SetDlgItemTextW
(
hwnd
,
IDC_LOOKINSTATIC
,
buf
);
}
...
...
@@ -2322,7 +2322,8 @@ static void FILEDLG95_MRU_save_filename(LPCWSTR filename)
HKEY
hkey
;
/* get the current executable's name */
if
(
!
GetModuleFileNameW
(
GetModuleHandleW
(
NULL
),
module_path
,
sizeof
(
module_path
)
/
sizeof
(
module_path
[
0
])))
{
if
(
!
GetModuleFileNameW
(
GetModuleHandleW
(
NULL
),
module_path
,
ARRAY_SIZE
(
module_path
)))
{
WARN
(
"GotModuleFileName failed: %d
\n
"
,
GetLastError
());
return
;
}
...
...
@@ -2409,7 +2410,8 @@ static void FILEDLG95_MRU_load_filename(LPWSTR stored_path)
WCHAR
module_path
[
MAX_PATH
],
*
module_name
;
/* get the current executable's name */
if
(
!
GetModuleFileNameW
(
GetModuleHandleW
(
NULL
),
module_path
,
sizeof
(
module_path
)
/
sizeof
(
module_path
[
0
])))
{
if
(
!
GetModuleFileNameW
(
GetModuleHandleW
(
NULL
),
module_path
,
ARRAY_SIZE
(
module_path
)))
{
WARN
(
"GotModuleFileName failed: %d
\n
"
,
GetLastError
());
return
;
}
...
...
@@ -2428,10 +2430,10 @@ void FILEDLG95_OnOpenMessage(HWND hwnd, int idCaption, int idText)
WCHAR
strMsgTitle
[
MAX_PATH
];
WCHAR
strMsgText
[
MAX_PATH
];
if
(
idCaption
)
LoadStringW
(
COMDLG32_hInstance
,
idCaption
,
strMsgTitle
,
sizeof
(
strMsgTitle
)
/
sizeof
(
WCHAR
));
LoadStringW
(
COMDLG32_hInstance
,
idCaption
,
strMsgTitle
,
ARRAY_SIZE
(
strMsgTitle
));
else
strMsgTitle
[
0
]
=
'\0'
;
LoadStringW
(
COMDLG32_hInstance
,
idText
,
strMsgText
,
sizeof
(
strMsgText
)
/
sizeof
(
WCHAR
));
LoadStringW
(
COMDLG32_hInstance
,
idText
,
strMsgText
,
ARRAY_SIZE
(
strMsgText
));
MessageBoxW
(
hwnd
,
strMsgText
,
strMsgTitle
,
MB_OK
|
MB_ICONHAND
);
}
...
...
@@ -4128,7 +4130,7 @@ static BOOL BrowseSelectedFolder(HWND hwnd)
pidlSelection
,
SBSP_RELATIVE
)
)
)
{
WCHAR
buf
[
64
];
LoadStringW
(
COMDLG32_hInstance
,
IDS_PATHNOTEXISTING
,
buf
,
sizeof
(
buf
)
/
sizeof
(
WCHAR
)
);
LoadStringW
(
COMDLG32_hInstance
,
IDS_PATHNOTEXISTING
,
buf
,
ARRAY_SIZE
(
buf
)
);
MessageBoxW
(
hwnd
,
buf
,
fodInfos
->
title
,
MB_OK
|
MB_ICONEXCLAMATION
);
}
bBrowseSelFolder
=
TRUE
;
...
...
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