wine/dlls/commdlg fontdlg.c

Jacek Caban jack at
Mon Aug 16 06:00:41 CDT 2004

Vincent Béron wrote:

>Le ven 13/08/2004 à 20:42, Alexandre Julliard a écrit :
>>ChangeSet ID:	13294
>>CVSROOT:	/opt/cvs-commit
>>Module name:	wine
>>Changes by:	julliard at	2004/08/13 19:42:35
>>Modified files:
>>	dlls/commdlg   : fontdlg.c 
>>Log message:
>>	Jacek Caban <jack at>
>>	Fix a bug in passing parameters to CFn_WMInitDialog and CFn_WMCommand
>>	in FormatCharDlgProcW.
>>Old revision  New revision  Changes     Path
>> 1.69          1.70          +2 -5       wine/dlls/commdlg/fontdlg.c
>At least the last part of this patch looks wrong.
>-        return CFn_WMCommand(hDlg, wParam, lParam, lpcf32a);
>+        return CFn_WMCommand(hDlg, wParam, lParam,
>This cast is absolutely non-sense, as lpcf32w is already a
>LPCHOOSEFONTW. Aslo, CFn_WMCommand expects a LPCHOOSEFONTA as its fourth
>parameter, not a LPCHOOSEFONTW.
It should be LPCHOOSEFONTA. Sory for that.

>Maybe just changing the cast to LPCHOOSEFONTA would work, but a quick
>glance in CFn_WMCommand told me it uses some A fields of that structure,
>so maybe it's not enough and we'll need to actually do a conversion (or
>transform CFn_WMCommand to expect a LPCHOOSEFONTW).
I've tested this usng notepad and it works fine. Absolutely non-sense 
was cast that
my patch changes. It didn't work without my patch. Applications failed 
with segmentation fault.

I've attached patch.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: fontdlg2.diff
Type: text/x-patch
Size: 714 bytes
Desc: not available
Url :

More information about the wine-devel mailing list