Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
324b11f2
Commit
324b11f2
authored
Jan 12, 2006
by
Stefan Brüns
Committed by
Alexandre Julliard
Jan 12, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commdlg: Makes return value of FILEDLG95_SendFileOK dependent of
return value, not of DWL_MSGRESULT.
parent
1be185f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
filedlg.c
dlls/commdlg/filedlg.c
+16
-10
filedlgbrowser.c
dlls/commdlg/filedlgbrowser.c
+1
-1
No files found.
dlls/commdlg/filedlg.c
View file @
324b11f2
...
...
@@ -228,7 +228,7 @@ static void *MemAlloc(UINT size);
static
void
MemFree
(
void
*
mem
);
INT_PTR
CALLBACK
FileOpenDlgProc95
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
void
SendCustomDlgNotificationMessage
(
HWND
hwndParentDlg
,
UINT
uCode
);
LRESULT
SendCustomDlgNotificationMessage
(
HWND
hwndParentDlg
,
UINT
uCode
);
static
INT_PTR
FILEDLG95_HandleCustomDialogMessages
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
static
BOOL
FILEDLG95_OnOpenMultipleFiles
(
HWND
hwnd
,
LPWSTR
lpstrFileList
,
UINT
nFileCount
,
UINT
sizeUsed
);
static
BOOL
BrowseSelectedFolder
(
HWND
hwnd
);
...
...
@@ -811,13 +811,15 @@ static HWND CreateTemplateDialog(FileOpenDlgInfos *fodInfos, HWND hwnd)
* Send CustomDialogNotification (CDN_FIRST -- CDN_LAST) message to the custom template dialog
*/
void
SendCustomDlgNotificationMessage
(
HWND
hwndParentDlg
,
UINT
uCode
)
LRESULT
SendCustomDlgNotificationMessage
(
HWND
hwndParentDlg
,
UINT
uCode
)
{
LRESULT
hook_result
=
0
;
FileOpenDlgInfos
*
fodInfos
=
(
FileOpenDlgInfos
*
)
GetPropA
(
hwndParentDlg
,
FileOpenDlgInfosStr
);
TRACE
(
"%p 0x%04x
\n
"
,
hwndParentDlg
,
uCode
);
if
(
!
fodInfos
)
return
;
if
(
!
fodInfos
)
return
0
;
if
(
fodInfos
->
DlgInfos
.
hwndCustomDlg
)
{
...
...
@@ -830,7 +832,7 @@ void SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode)
ofnNotify
.
hdr
.
code
=
uCode
;
ofnNotify
.
lpOFN
=
fodInfos
->
ofnInfos
;
ofnNotify
.
pszFile
=
NULL
;
SendMessageW
(
fodInfos
->
DlgInfos
.
hwndCustomDlg
,
WM_NOTIFY
,
0
,(
LPARAM
)
&
ofnNotify
);
hook_result
=
SendMessageW
(
fodInfos
->
DlgInfos
.
hwndCustomDlg
,
WM_NOTIFY
,
0
,(
LPARAM
)
&
ofnNotify
);
}
else
{
...
...
@@ -840,10 +842,12 @@ void SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode)
ofnNotify
.
hdr
.
code
=
uCode
;
ofnNotify
.
lpOFN
=
(
LPOPENFILENAMEA
)
fodInfos
->
ofnInfos
;
ofnNotify
.
pszFile
=
NULL
;
SendMessageA
(
fodInfos
->
DlgInfos
.
hwndCustomDlg
,
WM_NOTIFY
,
0
,(
LPARAM
)
&
ofnNotify
);
hook_result
=
SendMessageA
(
fodInfos
->
DlgInfos
.
hwndCustomDlg
,
WM_NOTIFY
,
0
,(
LPARAM
)
&
ofnNotify
);
}
TRACE
(
"RET NOTIFY
\n
"
);
}
TRACE
(
"Retval: 0x%08lx
\n
"
,
hook_result
);
return
hook_result
;
}
static
INT_PTR
FILEDLG95_Handle_GetFilePath
(
HWND
hwnd
,
DWORD
size
,
LPVOID
buffer
)
...
...
@@ -1593,22 +1597,24 @@ static BOOL FILEDLG95_SendFileOK( HWND hwnd, FileOpenDlgInfos *fodInfos )
/* ask the hook if we can close */
if
(
IsHooked
(
fodInfos
))
{
LRESULT
retval
;
TRACE
(
"---
\n
"
);
/* First send CDN_FILEOK as MSDN doc says */
SendCustomDlgNotificationMessage
(
hwnd
,
CDN_FILEOK
);
retval
=
SendCustomDlgNotificationMessage
(
hwnd
,
CDN_FILEOK
);
if
(
GetWindowLongPtrW
(
fodInfos
->
DlgInfos
.
hwndCustomDlg
,
DWLP_MSGRESULT
))
{
TRACE
(
"canceled
\n
"
);
return
FALSE
;
return
(
retval
==
0
)
;
}
/* fodInfos->ofnInfos points to an ASCII or UNICODE structure as appropriate */
SendMessageW
(
fodInfos
->
DlgInfos
.
hwndCustomDlg
,
fodInfos
->
HookMsg
.
fileokstring
,
0
,
(
LPARAM
)
fodInfos
->
ofnInfos
);
retval
=
SendMessageW
(
fodInfos
->
DlgInfos
.
hwndCustomDlg
,
fodInfos
->
HookMsg
.
fileokstring
,
0
,
(
LPARAM
)
fodInfos
->
ofnInfos
);
if
(
GetWindowLongPtrW
(
fodInfos
->
DlgInfos
.
hwndCustomDlg
,
DWLP_MSGRESULT
))
{
TRACE
(
"canceled
\n
"
);
return
FALSE
;
return
(
retval
==
0
)
;
}
}
return
TRUE
;
...
...
dlls/commdlg/filedlgbrowser.c
View file @
324b11f2
...
...
@@ -88,7 +88,7 @@ extern LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl);
extern
LPITEMIDLIST
GetPidlFromName
(
IShellFolder
*
psf
,
LPCSTR
lpcstrFileName
);
extern
int
FILEDLG95_LOOKIN_SelectItem
(
HWND
hwnd
,
LPITEMIDLIST
pidl
);
extern
void
SendCustomDlgNotificationMessage
(
HWND
hwndParentDlg
,
UINT
uCode
);
extern
LRESULT
SendCustomDlgNotificationMessage
(
HWND
hwndParentDlg
,
UINT
uCode
);
/*
...
...
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