标题:EnumWindows的使用
取消只看楼主
莫云今次
Rank: 3Rank: 3
来 自:浙江
等 级:论坛游侠
帖 子:385
专家分:166
注 册:2009-3-18
结帖率:100%
 问题点数:0 回复次数:0 
EnumWindows的使用
#include<windows.h>
BOOL CALLBACK lpEnumFunc(HWND hwnd, LPARAM lParam)
{
 char str[100];
 ::GetWindowText(hwnd,str,sizeof(str));
 MessageBox(NULL,str,str,MB_OK);
 return 1;
}
int WINAPI WinMain(
  HINSTANCE hInstance,  // handle to current instance
  HINSTANCE hPrevInstance,  // handle to previous instance
  LPSTR lpCmdLine,      // pointer to command line
  int nCmdShow          // show state of window
)
{
 EnumWindows(lpEnumFunc,NULL);
   
}
为什么我这样就枚举不到窗口的呢?结果MessageBox出来的都是空字符串;如果在mfc上这个回调函数又该如何设计,请高手指教
搜索更多相关主题的帖子: EnumWindows 
2009-08-20 00:38



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-283240-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.258170 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved