- Added support for CF_ENABLETEMPLATEHANDLE.

- Revised the FIXME on unsupported flags to not reported the flags now
  turned supported.
This commit is contained in:
Shachar Shemesh 2002-11-13 04:08:57 +00:00 committed by Alexandre Julliard
parent b09eef23b3
commit b61fd42e4d
1 changed files with 26 additions and 19 deletions

View File

@ -265,35 +265,42 @@ BOOL WINAPI ChooseFontA(LPCHOOSEFONTA lpChFont)
HINSTANCE hDlginst; HINSTANCE hDlginst;
HGLOBAL hDlgTmpl; HGLOBAL hDlgTmpl;
if ( (lpChFont->Flags&CF_ENABLETEMPLATE)!=0 ) if ( (lpChFont->Flags&CF_ENABLETEMPLATEHANDLE)!=0 )
{ {
hDlginst=lpChFont->hInstance; template=(LPCVOID)lpChFont->hInstance;
if( !(hResInfo = FindResourceA(hDlginst, lpChFont->lpTemplateName,
RT_DIALOGA)))
{
COMDLG32_SetCommDlgExtendedError(CDERR_FINDRESFAILURE);
return FALSE;
}
} else } else
{ {
hDlginst=COMMDLG_hInstance32; if ( (lpChFont->Flags&CF_ENABLETEMPLATE)!=0 )
if (!(hResInfo = FindResourceA(hDlginst, "CHOOSE_FONT", RT_DIALOGA)))
{ {
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; return FALSE;
} }
} }
if (!(hDlgTmpl = LoadResource(hDlginst, hResInfo )) ||
!(template = LockResource( hDlgTmpl )))
{
COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
return FALSE;
}
if (TRACE_ON(commdlg)) if (TRACE_ON(commdlg))
_dump_cf_flags(lpChFont->Flags); _dump_cf_flags(lpChFont->Flags);
if (lpChFont->Flags & (CF_SELECTSCRIPT | CF_NOVERTFONTS | CF_ENABLETEMPLATE | if (lpChFont->Flags & (CF_SELECTSCRIPT | CF_NOVERTFONTS ))
CF_ENABLETEMPLATEHANDLE)) FIXME(": unimplemented flag (ignored)\n"); FIXME(": unimplemented flag (ignored)\n");
return DialogBoxIndirectParamA(COMMDLG_hInstance32, template, return DialogBoxIndirectParamA(COMMDLG_hInstance32, template,
lpChFont->hwndOwner, FormatCharDlgProcA, (LPARAM)lpChFont ); lpChFont->hwndOwner, FormatCharDlgProcA, (LPARAM)lpChFont );
} }