#include<bits/stdc++.h> #include<windows.h> using namespace std; int main(){ //Sleep(5000); POINT p; GetCursorPos(&p); HWND h=WindowFromPoint(p); bool r=SendMessage(h,'h',0,0); if(r==0)cout<<1; }
请问给鼠标所在位置的窗口发送信息为什么总是输出1发送失败啊?(编译倒是过了) 搜索过没有结果,求救