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
adc72977
Commit
adc72977
authored
Jun 27, 2008
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Jun 30, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: RunFileDlg: make the error messages easier to understand for the user.
parent
ebb41a64
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
15 deletions
+9
-15
dialogs.c
dlls/shell32/dialogs.c
+9
-15
No files found.
dlls/shell32/dialogs.c
View file @
adc72977
...
...
@@ -100,14 +100,11 @@ void WINAPI RunFileDlgW(
rfdp
.
lpstrDescription
=
lpstrDescription
;
rfdp
.
uFlags
=
uFlags
;
if
(
!
(
hRes
=
FindResourceW
(
shell32_hInstance
,
resnameW
,
(
LPWSTR
)
RT_DIALOG
)))
if
(
!
(
hRes
=
FindResourceW
(
shell32_hInstance
,
resnameW
,
(
LPWSTR
)
RT_DIALOG
))
||
!
(
template
=
LoadResource
(
shell32_hInstance
,
hRes
)))
{
MessageBoxA
(
hwndOwner
,
"Couldn't find dialog."
,
"Nix"
,
MB_OK
)
;
return
;
}
if
(
!
(
template
=
LoadResource
(
shell32_hInstance
,
hRes
)))
{
MessageBoxA
(
hwndOwner
,
"Couldn't load dialog."
,
"Nix"
,
MB_OK
)
;
ERR
(
"Couldn't load SHELL_RUN_DLG resource
\n
"
);
MessageBoxA
(
hwndOwner
,
"Unable to display Run File dialog box (internal error)"
,
NULL
,
MB_OK
|
MB_ICONERROR
);
return
;
}
...
...
@@ -184,6 +181,7 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR
{
HMODULE
hComdlg
=
NULL
;
LPFNOFN
ofnProc
=
NULL
;
static
const
WCHAR
comdlg32W
[]
=
{
'c'
,
'o'
,
'm'
,
'd'
,
'l'
,
'g'
,
'3'
,
'2'
,
0
};
WCHAR
szFName
[
1024
]
=
{
0
};
WCHAR
szFilter
[
MAX_PATH
],
szCaption
[
MAX_PATH
];
static
const
char
ansiFilter
[]
=
"Executable Files
\0
*.exe
\0
All Files
\0
*.*
\0\0\0\0
"
;
...
...
@@ -200,15 +198,11 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR
ofn
.
lpstrTitle
=
szCaption
;
ofn
.
Flags
=
OFN_ENABLESIZING
|
OFN_FILEMUSTEXIST
|
OFN_HIDEREADONLY
|
OFN_PATHMUSTEXIST
;
if
(
NULL
==
(
hComdlg
=
LoadLibraryExA
(
"comdlg32"
,
NULL
,
0
)))
{
MessageBoxA
(
hwnd
,
"Unable to display dialog box (LoadLibraryEx) !"
,
"Nix"
,
MB_OK
|
MB_ICONEXCLAMATION
)
;
return
TRUE
;
}
if
(
NULL
==
(
ofnProc
=
(
LPFNOFN
)
GetProcAddress
(
hComdlg
,
"GetOpenFileNameW"
)))
if
(
NULL
==
(
hComdlg
=
LoadLibraryExW
(
comdlg32W
,
NULL
,
0
))
||
NULL
==
(
ofnProc
=
(
LPFNOFN
)
GetProcAddress
(
hComdlg
,
"GetOpenFileNameW"
)))
{
MessageBoxA
(
hwnd
,
"Unable to display dialog box (GetProcAddress) !"
,
"Nix"
,
MB_OK
|
MB_ICONEXCLAMATION
)
;
ERR
(
"Couldn't get GetOpenFileName function entry (lib=%p, proc=%p)
\n
"
,
hComdlg
,
ofnProc
);
MessageBoxA
(
hwnd
,
"Unable to display Browse dialog box (internal error)"
,
NULL
,
MB_OK
|
MB_ICONERROR
);
return
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