mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Added atl-AtlAxDialogBox patchset
This commit is contained in:
parent
d4deb4faac
commit
f215d139b4
@ -0,0 +1,100 @@
|
||||
From 452c42b4855e2f6338fa9b8746377ff9fe9ee706 Mon Sep 17 00:00:00 2001
|
||||
From: Qian Hong <qhong@codeweavers.com>
|
||||
Date: Wed, 23 Apr 2014 04:16:53 +0800
|
||||
Subject: [PATCH] atl: Implement AtlAxDialogBox[A,W]
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=32749
|
||||
---
|
||||
dlls/atl/atl_ax.c | 60 +++++++++++++++++++++++++++++++++++++++++++++----------
|
||||
1 file changed, 50 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c
|
||||
index 8121278..92fcb84 100644
|
||||
--- a/dlls/atl/atl_ax.c
|
||||
+++ b/dlls/atl/atl_ax.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "winerror.h"
|
||||
#include "winuser.h"
|
||||
#include "wine/debug.h"
|
||||
+#include "wine/heap.h"
|
||||
#include "objbase.h"
|
||||
#include "objidl.h"
|
||||
#include "ole2.h"
|
||||
@@ -1407,25 +1408,64 @@ HRESULT WINAPI AtlAxGetControl(HWND hWnd, IUnknown **pUnk)
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
- * AtlAxDialogBoxW [atl100.35]
|
||||
+ * AtlAxDialogBoxA [atl100.@]
|
||||
*
|
||||
*/
|
||||
-INT_PTR WINAPI AtlAxDialogBoxW(HINSTANCE hInstance, LPCWSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogProc,
|
||||
- LPARAM dwInitParam)
|
||||
+INT_PTR WINAPI AtlAxDialogBoxA(HINSTANCE hInst, LPCSTR name, HWND owner, DLGPROC dlgProc, LPARAM param)
|
||||
{
|
||||
- FIXME("(%p %s %p %p %lx)\n", hInstance, debugstr_w(lpTemplateName), hWndParent, lpDialogProc, dwInitParam);
|
||||
- return 0;
|
||||
+ INT_PTR res = 0;
|
||||
+ int length;
|
||||
+ WCHAR *nameW;
|
||||
+
|
||||
+ if (IS_INTRESOURCE(name))
|
||||
+ return AtlAxDialogBoxW( hInst, (LPCWSTR) name, owner, dlgProc, param );
|
||||
+
|
||||
+ length = MultiByteToWideChar( CP_ACP, 0, name, -1, NULL, 0 );
|
||||
+ nameW = heap_alloc( length * sizeof(WCHAR) );
|
||||
+ if (nameW)
|
||||
+ {
|
||||
+ MultiByteToWideChar( CP_ACP, 0, name, -1, nameW, length );
|
||||
+ res = AtlAxDialogBoxW( hInst, nameW, owner, dlgProc, param );
|
||||
+ heap_free( nameW );
|
||||
+ }
|
||||
+ return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
- * AtlAxDialogBoxA [atl100.36]
|
||||
+ * AtlAxDialogBoxW [atl100.@]
|
||||
*
|
||||
*/
|
||||
-INT_PTR WINAPI AtlAxDialogBoxA(HINSTANCE hInstance, LPCSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogProc,
|
||||
- LPARAM dwInitParam)
|
||||
+INT_PTR WINAPI AtlAxDialogBoxW(HINSTANCE hInst, LPCWSTR name, HWND owner, DLGPROC dlgProc, LPARAM param)
|
||||
{
|
||||
- FIXME("(%p %s %p %p %lx)\n", hInstance, debugstr_a(lpTemplateName), hWndParent, lpDialogProc, dwInitParam);
|
||||
- return 0;
|
||||
+ HRSRC hrsrc;
|
||||
+ HGLOBAL hgl;
|
||||
+ LPCDLGTEMPLATEW ptr;
|
||||
+ LPDLGTEMPLATEW newptr;
|
||||
+ INT_PTR res;
|
||||
+
|
||||
+ TRACE("(%p %s %p %p %lx)\n", hInst, debugstr_w(name), owner, dlgProc, param);
|
||||
+
|
||||
+ hrsrc = FindResourceW( hInst, name, (LPWSTR)RT_DIALOG );
|
||||
+ if ( !hrsrc )
|
||||
+ return 0;
|
||||
+ hgl = LoadResource (hInst, hrsrc);
|
||||
+ if ( !hgl )
|
||||
+ return 0;
|
||||
+ ptr = LockResource ( hgl );
|
||||
+ if (!ptr)
|
||||
+ {
|
||||
+ FreeResource( hgl );
|
||||
+ return 0;
|
||||
+ }
|
||||
+ newptr = AX_ConvertDialogTemplate( ptr );
|
||||
+ if ( newptr )
|
||||
+ {
|
||||
+ res = DialogBoxIndirectParamW( hInst, newptr, owner, dlgProc, param );
|
||||
+ heap_free( newptr );
|
||||
+ } else
|
||||
+ res = 0;
|
||||
+ FreeResource ( hrsrc );
|
||||
+ return res;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
--
|
||||
1.9.1
|
||||
|
1
patches/atl-AtlAxDialogBox/definition
Normal file
1
patches/atl-AtlAxDialogBox/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [32749] atl: Implemented AtlAxDialogBox[A,W]
|
@ -93,6 +93,7 @@ patch_enable_all ()
|
||||
enable_advapi32_SetSecurityInfo="$1"
|
||||
enable_advapi32_Token_Integrity_Level="$1"
|
||||
enable_api_ms_win_Stub_DLLs="$1"
|
||||
enable_atl_AtlAxDialogBox="$1"
|
||||
enable_avifil32_IGetFrame_fnSetFormat="$1"
|
||||
enable_avifile_dll16_AVIStreamGetFrame="$1"
|
||||
enable_bcrypt_BCryptDeriveKeyPBKDF2="$1"
|
||||
@ -444,6 +445,9 @@ patch_enable ()
|
||||
api-ms-win-Stub_DLLs)
|
||||
enable_api_ms_win_Stub_DLLs="$2"
|
||||
;;
|
||||
atl-AtlAxDialogBox)
|
||||
enable_atl_AtlAxDialogBox="$2"
|
||||
;;
|
||||
avifil32-IGetFrame_fnSetFormat)
|
||||
enable_avifil32_IGetFrame_fnSetFormat="$2"
|
||||
;;
|
||||
@ -2530,6 +2534,21 @@ if test "$enable_api_ms_win_Stub_DLLs" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset atl-AtlAxDialogBox
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#32749] atl: Implemented AtlAxDialogBox[A,W]
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/atl/atl_ax.c
|
||||
# |
|
||||
if test "$enable_atl_AtlAxDialogBox" -eq 1; then
|
||||
patch_apply atl-AtlAxDialogBox/0001-atl-Implement-AtlAxDialogBox-A-W.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Qian Hong", "atl: Implement AtlAxDialogBox[A,W].", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset avifil32-IGetFrame_fnSetFormat
|
||||
# |
|
||||
# | Modified files:
|
||||
|
Loading…
x
Reference in New Issue
Block a user