Hi, i'm trying to fill a CComboBox with the system's font names. This is the callback funtion:
Code:
int CALLBACK CWordProcessorDlg::EnumFontFamProc(LPENUMLOGFONT lpelf, LPNEWTEXTMETRIC lpntm, DWORD nFontType, long lParam)
{
m_ccbfontlist.AddString(lpelf->elfLogFont.lfFaceName);
return 1;
}
This is how i call the CALLBACK:
Code:
LOGFONT lf;
CClientDC dc(this);
::EnumFontFamiliesEx((HDC)dc,&lf,(FONTENUMPROC)EnumFontFamProc, (LPARAM)this,0);
But i get error msg C2440 on EnumFontFamiliesEx():
Code:
error C2440: 'type cast' : cannot convert from '' to 'int (__stdcall *)(const struct tagLOGFONTA *,const struct tagTEXTMETRICA *,unsigned long,long)'
Please help.