Commit 04f96a86 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

DWL_USER might be used otherwise, so use an internal window property

for data storage.
parent 14f7446f
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(commdlg); WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
#define WINE_FONTDATA "__WINE_FONTDLGDATA"
#include "cdlg.h" #include "cdlg.h"
static HBITMAP hBitmapTT = 0; static HBITMAP hBitmapTT = 0;
...@@ -686,7 +688,7 @@ LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam, ...@@ -686,7 +688,7 @@ LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
LPLOGFONTA lpxx; LPLOGFONTA lpxx;
HCURSOR hcursor=SetCursor(LoadCursorA(0,(LPSTR)IDC_WAIT)); HCURSOR hcursor=SetCursor(LoadCursorA(0,(LPSTR)IDC_WAIT));
SetWindowLongA(hDlg, DWL_USER, lParam); SetPropA(hDlg, WINE_FONTDATA, (HANDLE)lParam);
lpxx=lpcf->lpLogFont; lpxx=lpcf->lpLogFont;
TRACE("WM_INITDIALOG lParam=%08lX\n", lParam); TRACE("WM_INITDIALOG lParam=%08lX\n", lParam);
...@@ -1072,7 +1074,7 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam, ...@@ -1072,7 +1074,7 @@ LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
case psh15: case psh15:
i=RegisterWindowMessageA( HELPMSGSTRINGA ); i=RegisterWindowMessageA( HELPMSGSTRINGA );
if (lpcf->hwndOwner) if (lpcf->hwndOwner)
SendMessageA(lpcf->hwndOwner, i, 0, (LPARAM)GetWindowLongA(hDlg, DWL_USER)); SendMessageA(lpcf->hwndOwner, i, 0, (LPARAM)GetPropA(hDlg, WINE_FONTDATA));
/* if (CFn_HookCallChk(lpcf)) /* if (CFn_HookCallChk(lpcf))
CallWindowProc16(lpcf->lpfnHook,hDlg,WM_COMMAND,psh15,(LPARAM)lpcf);*/ CallWindowProc16(lpcf->lpfnHook,hDlg,WM_COMMAND,psh15,(LPARAM)lpcf);*/
break; break;
...@@ -1163,7 +1165,7 @@ INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, ...@@ -1163,7 +1165,7 @@ INT_PTR CALLBACK FormatCharDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam,
INT_PTR res = FALSE; INT_PTR res = FALSE;
if (uMsg!=WM_INITDIALOG) if (uMsg!=WM_INITDIALOG)
{ {
lpcf=(LPCHOOSEFONTA)GetWindowLongA(hDlg, DWL_USER); lpcf=(LPCHOOSEFONTA)GetPropA(hDlg, WINE_FONTDATA);
if (!lpcf && uMsg != WM_MEASUREITEM) if (!lpcf && uMsg != WM_MEASUREITEM)
return FALSE; return FALSE;
if (CFn_HookCallChk32(lpcf)) if (CFn_HookCallChk32(lpcf))
...@@ -1214,7 +1216,7 @@ INT_PTR CALLBACK FormatCharDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, ...@@ -1214,7 +1216,7 @@ INT_PTR CALLBACK FormatCharDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam,
INT_PTR res = FALSE; INT_PTR res = FALSE;
if (uMsg!=WM_INITDIALOG) if (uMsg!=WM_INITDIALOG)
{ {
lpcf32w=(LPCHOOSEFONTW)GetWindowLongA(hDlg, DWL_USER); lpcf32w=(LPCHOOSEFONTW)GetPropA(hDlg, WINE_FONTDATA);
if (!lpcf32w) if (!lpcf32w)
return FALSE; return FALSE;
if (CFn_HookCallChk32((LPCHOOSEFONTA)lpcf32w)) if (CFn_HookCallChk32((LPCHOOSEFONTA)lpcf32w))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment