如何在qml中使用windows.h

.cpp文件

添加头文件

#include "Windows.h"
#include "WinUser.h"

显示无法解析的外部符号
有WindowFromPoint,GetClassNameA,GetParent,FindWindowEx,SendMessage
都是WinUser.h定义的

那你得把c++环境好好装一遍。


https://blog.csdn.net/xiezhongyuan07/article/details/108076389 https://blog.csdn.net/xiezhongyuan07/article/details/108076389