C++无法使用 FindWindow() 找到 cmd
C++ cant find cmd using FindWindow()
#include<iostream>
#include<Windows.h>
using namespace std;
int main()
{
HWND handle = FindWindow("ConsoleWindowClass","C:WINDOWSsystem32cmd.exe");
if (handle == NULL)
cout << "Window not found" << endl;
else
cout << "Window found " << endl;
system("pause");
return 0;
}
我尝试使用此代码查找正在运行的cmd应用程序的句柄,但是FindWindow((找不到句柄。它显示未找到Winodw。请帮忙。
对于 unicode,请尝试以下代码片段:
HWND handle = FindWindow(L"ConsoleWindowClass", L"C:\WINDOWS\system32\cmd.exe");
相关文章:
- 如何使用ndk-build.cmd构建Android.so文件
- 给定n个元素的m个集合.在C++中找到出现在最大集合数中的元素
- 在Linux中哪里可以找到互斥、未来等的源代码
- cmake如何在fedora工作站中找到boost静态库包
- 芬威克树(BIT).找到具有给定累积频率的最小索引,单位为 O(logN)
- 无法找到/读取配置文件.conf-FileIOException
- 如何找到锁定Linux futex的C++行
- 如何找到大小'x'数组是否完全填充,在C++?
- libssh 的函数在构建 libssh 时无法在 Qt 和 cmake 错误中找到
- 如何在数组中找到字符串的长度
- 找到两对数字,使它们的乘积的绝对差最小化
- 如何在c++程序中找到函数的地址
- 如何找到2个单链表的公共节点
- 给定一个向量,如何找到该向量的所有子集和的原始索引
- 如何从棋盘上的箱号中找到行和列
- 有没有可能有一个只有ADL才能找到的非好友功能
- f2、f3、f4标识符未找到
- 有没有一种"cleaner"的方法可以在指向基的指针向量中找到派生类的第一个实例?
- C++无法使用 FindWindow() 找到 cmd
- 找到可执行文件的绝对路径,可以从CMD运行