关于EnumFontFamiliesEx()函数的使用问题?
EnumFontFamiliesEx()需要一个CALLBACK 函数指针做参数,我依照MSDN,
在程序中定义了如下CALLBACK函数:
int CALLBACK EnumFontFamExProc(
ENUMLOGFONTEX *lpelfe, // logical-font data
NEWTEXTMETRICEX *lpntme, // physical-font data
DWORD FontType, // type of font
LPARAM lParam // application-defined data
)
{
return 0;
}
可是,可是,为什么编译时就是过不去呀?出错信息如下:
txtmetricView.cpp(190) : error C2664: 'EnumFontFamiliesExA' : cannot convert parameter 3 from 'int (struct tagENUMLOGFONTEXA *,struct tagNEWTEXTMETRICEXA *,unsigned long,long)' to 'int (__stdcall *)(const struct tagLOGFONTA *,const struct tagTEXTMETRICA *,unsigned long,long)'
None of the functions with this name in scope match the target type
谁用过这个函数,能不能帮我解释一下错在哪里?谢过了先!