C#C++如何确定鼠标点击的坐标?

[复制链接]
查看11 | 回复3 | 2011-8-9 14:44:39 | 显示全部楼层 |阅读模式
C#C++如何确定鼠标点击的坐标?
做个象棋程序 鼠标点击的棋子在棋盘上的坐标怎么确定啊
如果做其他程序又怎么来确定鼠标的坐标呢?
例如游戏脚本

回复

使用道具 举报

千问 | 2011-8-9 14:44:39 | 显示全部楼层
获取鼠标点所在窗口的坐标或相对屏幕的坐标,然后你就可以做自己想做的了 using System;using System.Collections.Generic;using System.Text;namespace MouseEvent{
class Program
{
[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern int mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo...
回复

使用道具 举报

千问 | 2011-8-9 14:44:39 | 显示全部楼层
C#。C++中有函数能后得到当前客户区鼠标的坐标位置!要是映射鼠标关联函数那就更方便了...
回复

使用道具 举报

千问 | 2011-8-9 14:44:39 | 显示全部楼层
不是有个参数E吗?E.X,E.Y...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行