VC中用api函数FindWindow()查找窗口时的第1个参数'ClassName'应该是什么?
解决方案 »
- visual studio全屏时,如何不显示菜单、状态栏等?
- 关于图片颜色的问题
- SetCheck与GetCheck的问题
- 求教?
- 让CStatic 透明就这么难吗?
- 如何判断当前桌面是default桌面还是winlogon桌面?
- ACCESS数据库改变数据库中表的问题?
- 怎么样能够控制显示器的亮度和对比度?Win32下所有办法都可以啊!
- 各位GGJJ,帮帮忙!如果每点击一次button建立一个线程,建立多个不同的线程,怎样实现?
- 哪有The C++ Programming Language (Third Edition)下载???
- 串口通讯的典型例子有吗
- 解决蓝屏!!!:)特爽!!散分!!!!
窗口类名,每个窗口创建的时候需要指定窗口类名,可以用RegisterClass可以注册自己的窗口类。FindWindow可以查找窗口类等于classname的所有窗口。
The FindWindow function retrieves a handle to the top-level window whose class name and window name match the specified strings. This function does not search child windows. This function does not perform a case-sensitive search. To search child windows, beginning with a specified child window, use the FindWindowEx function. HWND FindWindow(
LPCTSTR lpClassName, // class name
LPCTSTR lpWindowName // window name
);
Parameters
lpClassName
[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 in the low-order word of lpClassName; the high-order word must be zero.
If lpClassName 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. lpWindowName
[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.
Return Values
If the function succeeds, the return value is a handle to the window that has the specified class name and window name.If the function fails, the return value is NULL. To get extended error information, call GetLastError. Res
If the lpWindowName parameter is not NULL, FindWindow calls the GetWindowText function to retrieve the window name for comparison. For a description of a potential problem that can arise, see the Res for GetWindowText.
CWnd::FindWindow(NULL,"程序名“);