FindWindowExW()函数后面四个参数的意义?

hbngwjl 2013-05-21 11:47:52
FindWindowExW()函数后面四个参数的意义?
求解释,
前两个貌似是两个句柄指针,后两个是??
...全文
282 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
wltg2001 2013-05-22
  • 打赏
  • 举报
回复
一个是窗口类名的字符串,一个是窗口标题的字符串
Eleven 2013-05-22
  • 打赏
  • 举报
回复
引用 4 楼 hbngwjl 的回复:
[quote=引用 3 楼 VisualEleven 的回复:] 后面那两个参数假如是汉字怎么搞? 比如就是想查找一个名为“登录”的一个button 求举例
FindWindowEx(HWND_PARENT, NULL, _T("Button"), _T("登录"));
hbngwjl 2013-05-22
  • 打赏
  • 举报
回复
[quote=引用 3 楼 VisualEleven 的回复:] 后面那两个参数假如是汉字怎么搞? 比如就是想查找一个名为“登录”的一个button 求举例
Eleven 2013-05-22
  • 打赏
  • 举报
回复
HWND FindWindowEx( HWND hwndParent, HWND hwndChildAfter, LPCTSTR lpszClass, LPCTSTR lpszWindow ); Parameters hwndParent [in] Handle to the parent window whose child windows are to be searched. If hwndParent is NULL, the function uses the desktop window as the parent window. The function searches among windows that are child windows of the desktop. Microsoft Windows 2000 and Windows XP: If hwndParent is HWND_MESSAGE, the function searches all message-only windows. hwndChildAfter [in] Handle to a child window. The search begins with the next child window in the Z order. The child window must be a direct child window of hwndParent, not just a descendant window. If hwndChildAfter is NULL, the search begins with the first child window of hwndParent. Note that if both hwndParent and hwndChildAfter are NULL, the function searches all top-level and message-only windows. lpszClass [in] Pointer to a null-terminated string that specifies the class name or a class atom created by a previous call to the RegisterClass or RegisterClassEx function. The atom must be placed in the low-order word of lpszClass; the high-order word must be zero. If lpszClass is a string, it specifies the window class name. The class name can be any name registered with RegisterClass or RegisterClassEx, or any of the predefined control-class names, or it can be MAKEINTATOM(0x800). In this latter case, 0x8000 is the atom for a menu class. For more information, see the Remarks section of this topic. lpszWindow [in] Pointer to a null-terminated string that specifies the window name (the window's title). If this parameter is NULL, all window names match.
hbngwjl 2013-05-22
  • 打赏
  • 举报
回复
求具体用法,比如想查找一个名为“哈哈”的Edit类 hEdit = FindWindowExW(hWnd, hEdit, L"Edit", 0); 这种用法是对的,求解:为什么“edit”前有个L? 还有我试过L“哈哈”是不对的,编译问题,应该是跟中文有关吧,中文前应该加什么?
引用 1 楼 wltg2001 的回复:
一个是窗口类名的字符串,一个是窗口标题的字符串

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧