c++builder中使用EnumChildWindows()函数的参数问题
BOOL CALLBACK EnumChildWin(HWND hwndChild,LPARAM lParam)
{ char nClass[20];
char enumClass[20] = "";
GetClassName(hwndChild, nClass, 20);
if(!strcmp(nClass, enumClass)) // 类名称是否匹配
{
hEnum = hwndChild;
return false;
}
return true;
}
.......
hForm = FindWindow(NULL,"Control Test");
EnumChildWindows(hForm, EnumChildWin, NULL); //加了这个函数后,运行时报错误
[C++ Error] Unit1.cpp(37): E2034 Cannot convert 'int (__stdcall *)(void *,long)' to 'int (__stdcall *)()'
[C++ Error] Unit1.cpp(37): E2342 Type mismatch in parameter 'lpEnumFunc' (wanted 'int (__stdcall *)()', got 'int (__stdcall *)(void *,long)')
请问这是什么问题造成的啊?