comdlg32: load ComboBoxEx before creating dialogs that use it (try 2)
Daniel Jeliński
djelinski1 at gmail.com
Sun May 5 15:09:01 CDT 2013
try 2: also fix unicode version
GetOpenFileName registers that class on Win2k. On WinXP+ GetClassInfo
returned true even before calling anything else. According to Geoff
Chappell's article on RegisterClassNameW function, these systems use
comctl32 manifest to locate that class.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20130505/31bcc6e2/attachment-0001.html>
-------------- next part --------------
From d16fab1f8fb09a94a98d6d71b07f1e72b4218cf5 Mon Sep 17 00:00:00 2001
From: Daniel Jelinski <djelinski1 at gmail.com>
Date: Sun, 5 May 2013 21:04:24 +0200
Subject: comdlg32: load ComboBoxEx before creating dialogs that use it
Fixes comdlg32 tests when running with native comctl32.
Allows notepad to create file dialogs on prefix running native.
Fixes bug 32728
Try 2: also fix Unicode version
---
dlls/comdlg32/filedlg.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c
index eeac384..9481517 100644
--- a/dlls/comdlg32/filedlg.c
+++ b/dlls/comdlg32/filedlg.c
@@ -356,6 +356,12 @@ static BOOL GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType)
LPWSTR defext = NULL;
LPWSTR filter = NULL;
LPWSTR customfilter = NULL;
+ INITCOMMONCONTROLSEX icc;
+
+ /* Initialize ComboBoxEx32 */
+ icc.dwSize = sizeof(icc);
+ icc.dwICC = ICC_USEREX_CLASSES;
+ InitCommonControlsEx(&icc);
/* Initialize CommDlgExtendedError() */
COMDLG32_SetCommDlgExtendedError(0);
@@ -489,6 +495,12 @@ static BOOL GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType)
BOOL ret;
FileOpenDlgInfos fodInfos;
LPWSTR lpstrSavDir = NULL;
+ INITCOMMONCONTROLSEX icc;
+
+ /* Initialize ComboBoxEx32 */
+ icc.dwSize = sizeof(icc);
+ icc.dwICC = ICC_USEREX_CLASSES;
+ InitCommonControlsEx(&icc);
/* Initialize CommDlgExtendedError() */
COMDLG32_SetCommDlgExtendedError(0);
--
1.7.5.4
More information about the wine-patches
mailing list