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
bbf2cce1
Commit
bbf2cce1
authored
Jul 20, 2012
by
Thomas Faber
Committed by
Alexandre Julliard
Jul 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Do not modify dialog resource directly.
parent
0e234f3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
filedlg.c
dlls/comdlg32/filedlg.c
+16
-5
No files found.
dlls/comdlg32/filedlg.c
View file @
bbf2cce1
...
...
@@ -252,7 +252,9 @@ static BOOL GetFileName95(FileOpenDlgInfos *fodInfos)
{
LRESULT
lRes
;
LPVOID
template
;
LPCVOID
origTemplate
;
DWORD
dwSize
;
LPDLGTEMPLATEW
template
;
HRSRC
hRes
;
HANDLE
hDlgTmpl
=
0
;
HRESULT
hr
;
...
...
@@ -271,12 +273,19 @@ static BOOL GetFileName95(FileOpenDlgInfos *fodInfos)
COMDLG32_SetCommDlgExtendedError
(
CDERR_FINDRESFAILURE
);
return
FALSE
;
}
if
(
!
(
hDlgTmpl
=
LoadResource
(
COMDLG32_hInstance
,
hRes
))
||
!
(
template
=
LockResource
(
hDlgTmpl
)))
if
(
!
(
dwSize
=
SizeofResource
(
COMDLG32_hInstance
,
hRes
))
||
!
(
hDlgTmpl
=
LoadResource
(
COMDLG32_hInstance
,
hRes
))
||
!
(
origTemplate
=
LockResource
(
hDlgTmpl
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_LOADRESFAILURE
);
return
FALSE
;
}
if
(
!
(
template
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwSize
)))
{
COMDLG32_SetCommDlgExtendedError
(
CDERR_MEMALLOCFAILURE
);
return
FALSE
;
}
memcpy
(
template
,
origTemplate
,
dwSize
);
/* msdn: explorer style dialogs permit sizing by default.
* The OFN_ENABLESIZING flag is only needed when a hook or
...
...
@@ -287,12 +296,12 @@ static BOOL GetFileName95(FileOpenDlgInfos *fodInfos)
if
(
fodInfos
->
ofnInfos
->
Flags
&
OFN_ENABLESIZING
)
{
((
LPDLGTEMPLATEW
)
template
)
->
style
|=
WS_SIZEBOX
;
template
->
style
|=
WS_SIZEBOX
;
fodInfos
->
sizedlg
.
cx
=
fodInfos
->
sizedlg
.
cy
=
0
;
fodInfos
->
initial_size
.
x
=
fodInfos
->
initial_size
.
y
=
0
;
}
else
((
LPDLGTEMPLATEW
)
template
)
->
style
&=
~
WS_SIZEBOX
;
template
->
style
&=
~
WS_SIZEBOX
;
/* old style hook messages */
...
...
@@ -322,6 +331,8 @@ static BOOL GetFileName95(FileOpenDlgInfos *fodInfos)
if
(
SUCCEEDED
(
hr
))
OleUninitialize
();
HeapFree
(
GetProcessHeap
(),
0
,
template
);
/* Unable to create the dialog */
if
(
lRes
==
-
1
)
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