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
ebb41a64
Commit
ebb41a64
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: allow the user to cancel the Browse dialog, remove some unneeded parameters.
parent
13866e81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
30 deletions
+17
-30
dialogs.c
dlls/shell32/dialogs.c
+17
-30
No files found.
dlls/shell32/dialogs.c
View file @
ebb41a64
...
...
@@ -184,36 +184,21 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR
{
HMODULE
hComdlg
=
NULL
;
LPFNOFN
ofnProc
=
NULL
;
WCHAR
szFName
[
1024
]
=
{
0
}
,
szFileTitle
[
256
]
=
{
0
},
szInitDir
[
768
]
=
{
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
"
;
OPENFILENAMEW
ofn
=
{
sizeof
(
OPENFILENAMEW
),
NULL
,
NULL
,
szFilter
,
NULL
,
0
,
0
,
szFName
,
1023
,
szFileTitle
,
255
,
szInitDir
,
szCaption
,
OFN_ENABLESIZING
|
OFN_FILEMUSTEXIST
|
OFN_HIDEREADONLY
|
OFN_PATHMUSTEXIST
,
0
,
0
,
NULL
,
0
,
(
LPOFNHOOKPROC
)
NULL
,
NULL
}
;
OPENFILENAMEW
ofn
;
MultiByteToWideChar
(
CP_UTF8
,
0
,
ansiFilter
,
sizeof
(
ansiFilter
),
szFilter
,
MAX_PATH
);
MultiByteToWideChar
(
CP_UTF8
,
0
,
"Browse"
,
-
1
,
szCaption
,
MAX_PATH
);
ofn
.
hwndOwner
=
hwnd
;
ZeroMemory
(
&
ofn
,
sizeof
(
ofn
));
ofn
.
lStructSize
=
sizeof
(
OPENFILENAMEW
);
ofn
.
hwndOwner
=
hwnd
;
ofn
.
lpstrFilter
=
szFilter
;
ofn
.
lpstrFile
=
szFName
;
ofn
.
nMaxFile
=
1023
;
ofn
.
lpstrTitle
=
szCaption
;
ofn
.
Flags
=
OFN_ENABLESIZING
|
OFN_FILEMUSTEXIST
|
OFN_HIDEREADONLY
|
OFN_PATHMUSTEXIST
;
if
(
NULL
==
(
hComdlg
=
LoadLibraryExA
(
"comdlg32"
,
NULL
,
0
)))
{
...
...
@@ -227,12 +212,14 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR
return
TRUE
;
}
ofnProc
(
&
ofn
)
;
if
(
ofnProc
(
&
ofn
))
{
SetFocus
(
GetDlgItem
(
hwnd
,
IDOK
))
;
SetWindowTextW
(
GetDlgItem
(
hwnd
,
12298
),
szFName
)
;
SendMessageW
(
GetDlgItem
(
hwnd
,
12298
),
CB_SETEDITSEL
,
0
,
MAKELPARAM
(
0
,
-
1
))
;
SetFocus
(
GetDlgItem
(
hwnd
,
IDOK
))
;
SetFocus
(
GetDlgItem
(
hwnd
,
IDOK
))
;
SetWindowTextW
(
GetDlgItem
(
hwnd
,
12298
),
szFName
)
;
SendMessageW
(
GetDlgItem
(
hwnd
,
12298
),
CB_SETEDITSEL
,
0
,
MAKELPARAM
(
0
,
-
1
))
;
SetFocus
(
GetDlgItem
(
hwnd
,
IDOK
))
;
}
FreeLibrary
(
hComdlg
)
;
...
...
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