Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
d80e24b8
Commit
d80e24b8
authored
16 years ago
by
Ricardo Filipe
Committed by
Alexandre Julliard
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
setupapi: Enable Browse action on SetupPromptForDisk dialog.
parent
c4c05cf0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/setupapi/dialog.c
+31
-0
31 additions, 0 deletions
dlls/setupapi/dialog.c
with
31 additions
and
0 deletions
dlls/setupapi/dialog.c
+
31
−
0
View file @
d80e24b8
...
...
@@ -90,6 +90,30 @@ static void promptdisk_init(HWND hwnd, struct promptdisk_params *params)
ShowWindow
(
GetDlgItem
(
hwnd
,
IDC_RUNDLG_BROWSE
),
SW_HIDE
);
}
/* When the user clicks the browse button in SetupPromptForDisk dialog
* it copies the path of the selected file to the dialog path field
*/
static
void
promptdisk_browse
(
HWND
hwnd
,
struct
promptdisk_params
*
params
)
{
OPENFILENAMEW
ofn
;
ZeroMemory
(
&
ofn
,
sizeof
(
ofn
));
ofn
.
lStructSize
=
sizeof
(
ofn
);
ofn
.
Flags
=
OFN_HIDEREADONLY
|
OFN_FILEMUSTEXIST
|
OFN_PATHMUSTEXIST
;
ofn
.
hwndOwner
=
hwnd
;
ofn
.
nMaxFile
=
MAX_PATH
;
ofn
.
lpstrFile
=
HeapAlloc
(
GetProcessHeap
(),
0
,
MAX_PATH
*
sizeof
(
WCHAR
));
strcpyW
(
ofn
.
lpstrFile
,
params
->
FileSought
);
if
(
GetOpenFileNameW
(
&
ofn
))
{
WCHAR
*
last_slash
=
strrchrW
(
ofn
.
lpstrFile
,
'\\'
);
if
(
last_slash
)
*
last_slash
=
0
;
SetDlgItemTextW
(
hwnd
,
IDC_PATH
,
ofn
.
lpstrFile
);
}
HeapFree
(
GetProcessHeap
(),
0
,
ofn
.
lpstrFile
);
}
/* Handles the messages sent to the SetupPromptForDisk dialog
*/
static
INT_PTR
CALLBACK
promptdisk_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
...
...
@@ -105,6 +129,13 @@ static INT_PTR CALLBACK promptdisk_proc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
case
IDCANCEL
:
EndDialog
(
hwnd
,
DPROMPT_CANCEL
);
return
TRUE
;
case
IDC_RUNDLG_BROWSE
:
{
struct
promptdisk_params
*
params
=
(
struct
promptdisk_params
*
)
GetWindowLongPtrW
(
hwnd
,
DWLP_USER
);
promptdisk_browse
(
hwnd
,
params
);
return
TRUE
;
}
}
}
return
FALSE
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment