我正在尝试在没有VNC的情况下构建C ++(clt)远程控制。屏幕截图流和键盘控件已经完成,现在我不知道如何控制鼠标。 我的想法是:
但它不起作用。这是代码:
Remotescreenwitdh = SystemInformation::VirtualScreen.Width;
Remotescreenhieght = SystemInformation::VirtualScreen.Height;
double Curry = (double)(Cursor->Position.Y - this->Top);
double proportionY = (double)(screenhieght / this->Height);
double Currx = (double)(Cursor->Position.X - this->Left);
double proportionX = (double)(screenwitdh / this->Width);
int realvalx = (screenwitdh*Currx) / this->Width;
int realvaly = (screenhieght*Curry) / this->Height;