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



LinkBack URL
About LinkBacks


