Hi every body!
I have a trouble, help me please!
I am a beginner in MFC programming. I have coded a progam using font system. Through a book, I knew the way to lists font system by using two functions:
int CALLBACK EnumFontFamExProc(ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme, DWORD nFontType, LPARAM lParam)
{
CFontDlg *pWnd = (CFontDlg*) lParam;
pWnd->m_lbFont.AddString(lpelfe->elfLogFont.lfFaceName);
return 1;
}
void CFontDlg::FillFontList(void)
{
LOGFONT lf;
lf.lfCharSet = DEFAULT_CHARSET;
lstrcpy(lf.lfFaceName, _T(""));
m_lbFont.ResetContent();
CClientDC dc(this);
::EnumFontFamiliesEx((HDC) dc, &lf, (FONTENUMPROC) EnumFontFamExProc, (LPARAM) this, 0);
}
When I build the program, there is a error:
error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'FONTENUMPROC'
I can't understand what is happended. Please help me!
My address: maidinhduong_2179 [at] yahoo.com.vn
Thankyou!