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
2d263ce7
Commit
2d263ce7
authored
Nov 21, 1999
by
Juergen Schmied
Committed by
Alexandre Julliard
Nov 21, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- the fodInfos were used before initialized
- lpTemplateName can be a resource id - if lpTemplateName is a string don't free the original one
parent
1d5bc469
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
filedlg95.c
dlls/commdlg/filedlg95.c
+21
-9
No files found.
dlls/commdlg/filedlg95.c
View file @
2d263ce7
...
...
@@ -281,8 +281,14 @@ BOOL WINAPI GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType)
fodInfos
->
ofnInfos
.
lCustData
=
ofn
->
lCustData
;
fodInfos
->
ofnInfos
.
lpfnHook
=
(
LPOFNHOOKPROC
)
ofn
->
lpfnHook
;
if
(
ofn
->
lpTemplateName
)
if
(
HIWORD
(
ofn
->
lpTemplateName
)
)
{
fodInfos
->
ofnInfos
.
lpTemplateName
=
MemAlloc
(
strlen
(
ofn
->
lpTemplateName
)
+
1
);
strcpy
((
LPSTR
)
fodInfos
->
ofnInfos
.
lpTemplateName
,
ofn
->
lpTemplateName
);
}
else
{
/* resource id */
fodInfos
->
ofnInfos
.
lpTemplateName
=
ofn
->
lpTemplateName
;
}
...
...
@@ -321,7 +327,7 @@ BOOL WINAPI GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType)
if
(
fodInfos
->
ofnInfos
.
lpstrFilter
)
MemFree
((
LPVOID
)(
fodInfos
->
ofnInfos
.
lpstrFilter
));
if
(
fodInfos
->
ofnInfos
.
lpTemplateName
)
if
(
HIWORD
(
fodInfos
->
ofnInfos
.
lpTemplateName
)
)
MemFree
((
LPVOID
)(
fodInfos
->
ofnInfos
.
lpTemplateName
));
if
(
fodInfos
->
ofnInfos
.
lpstrDefExt
)
MemFree
((
LPVOID
)(
fodInfos
->
ofnInfos
.
lpstrDefExt
));
...
...
@@ -441,11 +447,17 @@ BOOL WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType)
}
fodInfos
->
ofnInfos
.
lCustData
=
ofn
->
lCustData
;
fodInfos
->
ofnInfos
.
lpfnHook
=
(
LPOFNHOOKPROC
)
ofn
->
lpfnHook
;
if
(
ofn
->
lpTemplateName
)
if
(
HIWORD
(
ofn
->
lpTemplateName
))
{
fodInfos
->
ofnInfos
.
lpTemplateName
=
(
LPSTR
)
MemAlloc
(
lstrlenW
(
ofn
->
lpTemplateName
)
+
1
);
lstrcpyWtoA
((
LPSTR
)
fodInfos
->
ofnInfos
.
lpTemplateName
,
ofn
->
lpTemplateName
);
}
else
{
/* resource id */
fodInfos
->
ofnInfos
.
lpTemplateName
=
(
LPSTR
)
ofn
->
lpTemplateName
;
}
/* Initialise the dialog property */
fodInfos
->
DlgInfos
.
dwDlgProp
=
0
;
...
...
@@ -474,7 +486,7 @@ BOOL WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType)
if
(
fodInfos
->
ofnInfos
.
lpstrFilter
)
MemFree
((
LPVOID
)(
fodInfos
->
ofnInfos
.
lpstrFilter
));
if
(
fodInfos
->
ofnInfos
.
lpTemplateName
)
if
(
HIWORD
(
fodInfos
->
ofnInfos
.
lpTemplateName
)
)
MemFree
((
LPVOID
)(
fodInfos
->
ofnInfos
.
lpTemplateName
));
if
(
fodInfos
->
ofnInfos
.
lpstrDefExt
)
MemFree
((
LPVOID
)(
fodInfos
->
ofnInfos
.
lpstrDefExt
));
...
...
@@ -816,10 +828,14 @@ HRESULT FILEDLG95_HandleCustomDialogMessages(HWND hwnd, UINT uMsg, WPARAM wParam
*/
HRESULT
WINAPI
FileOpenDlgProc95
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
switch
(
uMsg
)
{
case
WM_INITDIALOG
:
/* Adds the FileOpenDlgInfos in the property list of the dialog
so it will be easily accessible through a GetPropA(...) */
SetPropA
(
hwnd
,
FileOpenDlgInfosStr
,
(
HANDLE
)
lParam
);
((
FileOpenDlgInfos
*
)
lParam
)
->
DlgInfos
.
hwndCustomDlg
=
CreateTemplateDialog
((
FileOpenDlgInfos
*
)
lParam
,
hwnd
);
FILEDLG95_OnWMInitDialog
(
hwnd
,
wParam
,
lParam
);
...
...
@@ -863,10 +879,6 @@ static LRESULT FILEDLG95_OnWMInitDialog(HWND hwnd, WPARAM wParam, LPARAM lParam)
TRACE
(
"
\n
"
);
/* Adds the FileOpenDlgInfos in the property list of the dialog
so it will be easily accessible through a GetPropA(...) */
SetPropA
(
hwnd
,
FileOpenDlgInfosStr
,
(
HANDLE
)
fodInfos
);
/* Make sure the common control DLL is loaded */
InitCommonControls
();
...
...
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