.NET 处理windows消息中获得LParam中XY坐标的两种方法
时间:2010-12-11 来源:狐狸狡猾不
int nPosX = (Msg.LParam.ToInt32() & 65535);
int nPosY = (Msg.LParam.ToInt32() >> 16);
int nPosY = (Msg.LParam.ToInt32() >> 16);
2.转换成Point对象 此方法容易使用
Point point = new Point(Msg.LParam.ToInt32());
获得Point对象直接访问point.X point.Y就太轻易了
相关阅读 更多 +
排行榜 更多 +