mirror of
https://github.com/reactos/reactos.git
synced 2025-04-16 18:50:22 +00:00
[COMDLG32]
- Don't modify a dialog template resource directly, instead make a copy of it. - Should be sent to wine (bug #7189) [BROWSEUI] - Remove useless diff file. svn path=/trunk/; revision=56897
This commit is contained in:
parent
0f649c901a
commit
2695b170c2
3 changed files with 85 additions and 20 deletions
|
@ -1,15 +0,0 @@
|
|||
Index: browseui.rbuild
|
||||
===================================================================
|
||||
--- browseui.rbuild (revision 23123)
|
||||
+++ browseui.rbuild (working copy)
|
||||
@@ -9,8 +9,8 @@
|
||||
<define name="__WINESRC__" />
|
||||
<define name="__USE_W32API" />
|
||||
<define name="_WIN32_IE">0x600</define>
|
||||
- <define name="_WIN32_WINNT">0x501</define>
|
||||
- <define name="WINVER">0x501</define>
|
||||
+ <define name="_WIN32_WINNT">0x600</define>
|
||||
+ <define name="WINVER">0x600</define>
|
||||
<library>wine</library>
|
||||
<library>ole32</library>
|
||||
<library>user32</library>
|
71
reactos/dll/win32/comdlg32/comdlg32_ros.diff
Normal file
71
reactos/dll/win32/comdlg32/comdlg32_ros.diff
Normal file
|
@ -0,0 +1,71 @@
|
|||
Index: filedlg.c
|
||||
===================================================================
|
||||
--- filedlg.c (Revision 56893)
|
||||
+++ filedlg.c (Arbeitskopie)
|
||||
@@ -260,6 +260,8 @@
|
||||
HRSRC hRes;
|
||||
HANDLE hDlgTmpl = 0;
|
||||
HRESULT hr;
|
||||
+ DWORD dwSize;
|
||||
+ LPDLGTEMPLATE hDialogTemplate;
|
||||
|
||||
/* test for missing functionality */
|
||||
if (fodInfos->ofnInfos->Flags & UNIMPLEMENTED_FLAGS)
|
||||
@@ -276,12 +278,17 @@
|
||||
return FALSE;
|
||||
}
|
||||
if (!(hDlgTmpl = LoadResource(COMDLG32_hInstance, hRes )) ||
|
||||
+ !(dwSize = SizeofResource(COMDLG32_hInstance, hRes )) ||
|
||||
+ !(hDialogTemplate = malloc(dwSize)) ||
|
||||
!(template = LockResource( hDlgTmpl )))
|
||||
{
|
||||
COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+ /* Copy the read only resource */
|
||||
+ memcpy(hDialogTemplate, template, dwSize);
|
||||
+
|
||||
/* msdn: explorer style dialogs permit sizing by default.
|
||||
* The OFN_ENABLESIZING flag is only needed when a hook or
|
||||
* custom tmeplate is provided */
|
||||
@@ -291,12 +298,12 @@
|
||||
|
||||
if (fodInfos->ofnInfos->Flags & OFN_ENABLESIZING)
|
||||
{
|
||||
- ((LPDLGTEMPLATEW)template)->style |= WS_SIZEBOX;
|
||||
+ hDialogTemplate->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;
|
||||
+ hDialogTemplate->style &= ~WS_SIZEBOX;
|
||||
|
||||
|
||||
/* old style hook messages */
|
||||
@@ -313,19 +320,21 @@
|
||||
|
||||
if (fodInfos->unicode)
|
||||
lRes = DialogBoxIndirectParamW(COMDLG32_hInstance,
|
||||
- template,
|
||||
+ hDialogTemplate,
|
||||
fodInfos->ofnInfos->hwndOwner,
|
||||
FileOpenDlgProc95,
|
||||
(LPARAM) fodInfos);
|
||||
else
|
||||
lRes = DialogBoxIndirectParamA(COMDLG32_hInstance,
|
||||
- template,
|
||||
+ hDialogTemplate,
|
||||
fodInfos->ofnInfos->hwndOwner,
|
||||
FileOpenDlgProc95,
|
||||
(LPARAM) fodInfos);
|
||||
- if (SUCCEEDED(hr))
|
||||
+ if (SUCCEEDED(hr))
|
||||
OleUninitialize();
|
||||
|
||||
+ free(hDialogTemplate);
|
||||
+
|
||||
/* Unable to create the dialog */
|
||||
if( lRes == -1)
|
||||
return FALSE;
|
|
@ -260,6 +260,8 @@ static BOOL GetFileName95(FileOpenDlgInfos *fodInfos)
|
|||
HRSRC hRes;
|
||||
HANDLE hDlgTmpl = 0;
|
||||
HRESULT hr;
|
||||
DWORD dwSize;
|
||||
LPDLGTEMPLATE hDialogTemplate;
|
||||
|
||||
/* test for missing functionality */
|
||||
if (fodInfos->ofnInfos->Flags & UNIMPLEMENTED_FLAGS)
|
||||
|
@ -276,12 +278,17 @@ static BOOL GetFileName95(FileOpenDlgInfos *fodInfos)
|
|||
return FALSE;
|
||||
}
|
||||
if (!(hDlgTmpl = LoadResource(COMDLG32_hInstance, hRes )) ||
|
||||
!(dwSize = SizeofResource(COMDLG32_hInstance, hRes )) ||
|
||||
!(hDialogTemplate = malloc(dwSize)) ||
|
||||
!(template = LockResource( hDlgTmpl )))
|
||||
{
|
||||
COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Copy the read only resource */
|
||||
memcpy(hDialogTemplate, template, dwSize);
|
||||
|
||||
/* msdn: explorer style dialogs permit sizing by default.
|
||||
* The OFN_ENABLESIZING flag is only needed when a hook or
|
||||
* custom tmeplate is provided */
|
||||
|
@ -291,12 +298,12 @@ static BOOL GetFileName95(FileOpenDlgInfos *fodInfos)
|
|||
|
||||
if (fodInfos->ofnInfos->Flags & OFN_ENABLESIZING)
|
||||
{
|
||||
((LPDLGTEMPLATEW)template)->style |= WS_SIZEBOX;
|
||||
hDialogTemplate->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;
|
||||
hDialogTemplate->style &= ~WS_SIZEBOX;
|
||||
|
||||
|
||||
/* old style hook messages */
|
||||
|
@ -313,19 +320,21 @@ static BOOL GetFileName95(FileOpenDlgInfos *fodInfos)
|
|||
|
||||
if (fodInfos->unicode)
|
||||
lRes = DialogBoxIndirectParamW(COMDLG32_hInstance,
|
||||
template,
|
||||
hDialogTemplate,
|
||||
fodInfos->ofnInfos->hwndOwner,
|
||||
FileOpenDlgProc95,
|
||||
(LPARAM) fodInfos);
|
||||
else
|
||||
lRes = DialogBoxIndirectParamA(COMDLG32_hInstance,
|
||||
template,
|
||||
hDialogTemplate,
|
||||
fodInfos->ofnInfos->hwndOwner,
|
||||
FileOpenDlgProc95,
|
||||
(LPARAM) fodInfos);
|
||||
if (SUCCEEDED(hr))
|
||||
if (SUCCEEDED(hr))
|
||||
OleUninitialize();
|
||||
|
||||
free(hDialogTemplate);
|
||||
|
||||
/* Unable to create the dialog */
|
||||
if( lRes == -1)
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue