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
2118ce0f
Commit
2118ce0f
authored
Mar 20, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Add a helper to test if file dialog hook is enabled.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7514475c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
filedlg.c
dlls/comdlg32/filedlg.c
+10
-7
No files found.
dlls/comdlg32/filedlg.c
View file @
2118ce0f
...
...
@@ -84,8 +84,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
OFN_NODEREFERENCELINKS | OFN_NOREADONLYRETURN |\
OFN_NOTESTFILECREATE
/*| OFN_USEMONIKERS*/
)
#define IsHooked(fodInfos) \
((fodInfos->ofnInfos->Flags & OFN_ENABLEHOOK) && fodInfos->ofnInfos->lpfnHook)
/***********************************************************************
* Data structure and global variables
*/
...
...
@@ -184,6 +182,11 @@ FileOpenDlgInfos *get_filedlg_infoptr(HWND hwnd)
return
GetPropW
(
hwnd
,
filedlg_info_propnameW
);
}
static
BOOL
is_dialog_hooked
(
const
FileOpenDlgInfos
*
info
)
{
return
(
info
->
ofnInfos
->
Flags
&
OFN_ENABLEHOOK
)
&&
info
->
ofnInfos
->
lpfnHook
;
}
/***********************************************************************
* Prototypes
*/
...
...
@@ -307,7 +310,7 @@ static BOOL GetFileName95(FileOpenDlgInfos *fodInfos)
}
/* old style hook messages */
if
(
IsH
ooked
(
fodInfos
))
if
(
is_dialog_h
ooked
(
fodInfos
))
{
fodInfos
->
HookMsg
.
fileokstring
=
RegisterWindowMessageW
(
FILEOKSTRINGW
);
fodInfos
->
HookMsg
.
lbselchstring
=
RegisterWindowMessageW
(
LBSELCHSTRINGW
);
...
...
@@ -824,15 +827,15 @@ static HWND CreateTemplateDialog(FileOpenDlgInfos *fodInfos, HWND hwnd)
}
if
(
fodInfos
->
unicode
)
hChildDlg
=
CreateDialogIndirectParamW
(
hinst
,
template
,
hwnd
,
IsH
ooked
(
fodInfos
)
?
(
DLGPROC
)
fodInfos
->
ofnInfos
->
lpfnHook
:
FileOpenDlgProcUserTemplate
,
is_dialog_h
ooked
(
fodInfos
)
?
(
DLGPROC
)
fodInfos
->
ofnInfos
->
lpfnHook
:
FileOpenDlgProcUserTemplate
,
(
LPARAM
)
fodInfos
->
ofnInfos
);
else
hChildDlg
=
CreateDialogIndirectParamA
(
hinst
,
template
,
hwnd
,
IsH
ooked
(
fodInfos
)
?
(
DLGPROC
)
fodInfos
->
ofnInfos
->
lpfnHook
:
FileOpenDlgProcUserTemplate
,
is_dialog_h
ooked
(
fodInfos
)
?
(
DLGPROC
)
fodInfos
->
ofnInfos
->
lpfnHook
:
FileOpenDlgProcUserTemplate
,
(
LPARAM
)
fodInfos
->
ofnInfos
);
return
hChildDlg
;
}
else
if
(
IsH
ooked
(
fodInfos
))
else
if
(
is_dialog_h
ooked
(
fodInfos
))
{
RECT
rectHwnd
;
struct
{
...
...
@@ -2014,7 +2017,7 @@ static LRESULT FILEDLG95_OnWMGetIShellBrowser(HWND hwnd)
static
BOOL
FILEDLG95_SendFileOK
(
HWND
hwnd
,
FileOpenDlgInfos
*
fodInfos
)
{
/* ask the hook if we can close */
if
(
IsH
ooked
(
fodInfos
))
if
(
is_dialog_h
ooked
(
fodInfos
))
{
LRESULT
retval
=
0
;
...
...
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