PATCH: fontdlg prop / bug 128
Marcus Meissner
marcus at jet.franken.de
Thu Dec 18 16:09:29 CST 2003
Hi,
Bug 128 is pretty easy to solve if we switch the window data storage from DWL_USER
to a window property.
Ciao, Marcus
Changelog:
DWL_USER might be used otherwise, so use an internal window property
for data storage.
Index: fontdlg.c
===================================================================
RCS file: /home/wine/wine/dlls/commdlg/fontdlg.c,v
retrieving revision 1.66
diff -u -r1.66 fontdlg.c
--- dlls/commdlg/fontdlg.c 12 Dec 2003 06:09:13 -0000 1.66
+++ dlls/commdlg/fontdlg.c 18 Dec 2003 22:08:05 -0000
@@ -39,6 +39,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(commdlg);
+#define WINE_FONTDATA "__WINE_FONTDLGDATA"
+
#include "cdlg.h"
static HBITMAP hBitmapTT = 0;
@@ -686,7 +688,7 @@
LPLOGFONTA lpxx;
HCURSOR hcursor=SetCursor(LoadCursorA(0,(LPSTR)IDC_WAIT));
- SetWindowLongA(hDlg, DWL_USER, lParam);
+ SetPropA(hDlg, WINE_FONTDATA, lParam);
lpxx=lpcf->lpLogFont;
TRACE("WM_INITDIALOG lParam=%08lX\n", lParam);
@@ -1072,7 +1074,7 @@
case psh15:
i=RegisterWindowMessageA( HELPMSGSTRINGA );
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))
CallWindowProc16(lpcf->lpfnHook,hDlg,WM_COMMAND,psh15,(LPARAM)lpcf);*/
break;
@@ -1163,7 +1165,7 @@
INT_PTR res = FALSE;
if (uMsg!=WM_INITDIALOG)
{
- lpcf=(LPCHOOSEFONTA)GetWindowLongA(hDlg, DWL_USER);
+ lpcf=(LPCHOOSEFONTA)GetPropA(hDlg, WINE_FONTDATA);
if (!lpcf && uMsg != WM_MEASUREITEM)
return FALSE;
if (CFn_HookCallChk32(lpcf))
@@ -1214,7 +1216,7 @@
INT_PTR res = FALSE;
if (uMsg!=WM_INITDIALOG)
{
- lpcf32w=(LPCHOOSEFONTW)GetWindowLongA(hDlg, DWL_USER);
+ lpcf32w=(LPCHOOSEFONTW)GetPropA(hDlg, WINE_FONTDATA);
if (!lpcf32w)
return FALSE;
if (CFn_HookCallChk32((LPCHOOSEFONTA)lpcf32w))
More information about the wine-patches
mailing list