有2个全局函数:
void A()
{
   EnumWindows(EnumFunction, NULL);}
BOOL CALLBACK EnumChiFunction(HWND hwnd LPARAM lparam)
{
   MessageBox(NULL,"this is a test",NULL);  //怎么执行不了这呢?
}
BOOL CALLBACK EnumFunction(HWND hwnd LPARAM lparam)
{
   EnumChildWindows(hwnd,EnumChiFunction,NULL); //在这里就有问题了,执行到这他怎么就调用不了EnumChiFunction函数呢?}

解决方案 »

  1.   

    the callback function should returns TRUE if you want to continue enumerating
    BOOL CALLBACK EnumChiFunction(HWND hwnd LPARAM lparam)
    {
       MessageBox(NULL,"this is a test",NULL);  //怎么执行不了这呢?
    return TRUE;
    }
      

  2.   

    你好 masterz(MS MVP) 我加上return true 还是不行的,它就是进不去EnumChiFunction函数的,谢谢你.
      

  3.   

    用这个函数名试试 BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lParam);