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
d80e24b8
Commit
d80e24b8
authored
Feb 18, 2009
by
Ricardo Filipe
Committed by
Alexandre Julliard
Feb 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Enable Browse action on SetupPromptForDisk dialog.
parent
c4c05cf0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
dialog.c
dlls/setupapi/dialog.c
+31
-0
No files found.
dlls/setupapi/dialog.c
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
;
...
...
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