Template support for font dialog 2
Shachar Shemesh
wine-patches at sun.consumer.org.il
Tue Nov 12 16:13:17 CST 2002
License: LGPL
ChangeLog:
Shachar Shemesh <winecode at sun.consumer.org.il>
dlls/commdlg/fontdlg.c
* Added support for CF_ENABLETEMPLATEHANDLE
* Revised the FIXME on unsupported flags to not reported the flags
now turned supported.
-------------- next part --------------
Index: dlls/commdlg/fontdlg.c
===================================================================
RCS file: /home/sun/sources/cvs/wine/dlls/commdlg/fontdlg.c,v
retrieving revision 1.44
diff -u -r1.44 fontdlg.c
--- dlls/commdlg/fontdlg.c 8 Nov 2002 18:56:46 -0000 1.44
+++ dlls/commdlg/fontdlg.c 12 Nov 2002 21:57:58 -0000
@@ -265,35 +265,42 @@
HINSTANCE hDlginst;
HGLOBAL hDlgTmpl;
- if ( (lpChFont->Flags&CF_ENABLETEMPLATE)!=0 )
+ if ( (lpChFont->Flags&CF_ENABLETEMPLATEHANDLE)!=0 )
{
- hDlginst=lpChFont->hInstance;
- if( !(hResInfo = FindResourceA(hDlginst, lpChFont->lpTemplateName,
- RT_DIALOGA)))
- {
- COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
- return FALSE;
- }
+ template=(LPCVOID)lpChFont->hInstance;
} else
{
- hDlginst=COMMDLG_hInstance32;
- if (!(hResInfo = FindResourceA(hDlginst, "CHOOSE_FONT", RT_DIALOGA)))
+ if ( (lpChFont->Flags&CF_ENABLETEMPLATE)!=0 )
{
- COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
+ hDlginst=lpChFont->hInstance;
+ if( !(hResInfo = FindResourceA(hDlginst, lpChFont->lpTemplateName,
+ RT_DIALOGA)))
+ {
+ COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
+ return FALSE;
+ }
+ } else
+ {
+ hDlginst=COMMDLG_hInstance32;
+ if (!(hResInfo = FindResourceA(hDlginst, "CHOOSE_FONT", RT_DIALOGA)))
+ {
+ COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
+ return FALSE;
+ }
+ }
+ if (!(hDlgTmpl = LoadResource(hDlginst, hResInfo )) ||
+ !(template = LockResource( hDlgTmpl )))
+ {
+ COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
return FALSE;
}
}
- if (!(hDlgTmpl = LoadResource(hDlginst, hResInfo )) ||
- !(template = LockResource( hDlgTmpl )))
- {
- COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
- return FALSE;
- }
if (TRACE_ON(commdlg))
_dump_cf_flags(lpChFont->Flags);
- if (lpChFont->Flags & (CF_SELECTSCRIPT | CF_NOVERTFONTS | CF_ENABLETEMPLATE |
- CF_ENABLETEMPLATEHANDLE)) FIXME(": unimplemented flag (ignored)\n");
+ if (lpChFont->Flags & (CF_SELECTSCRIPT | CF_NOVERTFONTS ))
+ FIXME(": unimplemented flag (ignored)\n");
+
return DialogBoxIndirectParamA(COMMDLG_hInstance32, template,
lpChFont->hwndOwner, FormatCharDlgProcA, (LPARAM)lpChFont );
}
More information about the wine-patches
mailing list