多个鼠标/鼠标/光标? [英] Multiple mouse/mice/cursor?

查看:150
本文介绍了多个鼠标/鼠标/光标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何显示多个鼠标的另一个游标?
我有两个TMemos,两个键盘可以输入到它们各自的TMemo,2个鼠标,我需要2个光标。

How can I show another cursor for multiple mice? I have two TMemos, two keyboards which can type into their respective TMemo, 2 mice and I need 2 cursors those.

如果假设,我可以检测哪个鼠标是哪个。如何使我自己的光标与它一起。 (使用Delphi)
可能沿多点

If hypothetically, I can already detect which mouse is which. How can I make my own cursor to go along with it. (using Delphi) Possibly along the lines of Multipoint

作为替代,是否有任何软件可以渲染更多的一个光标。像 CPNMouse

as an alternative, is there any software which can render more that one cursor. Like CPNMouse?

编辑:
我发现我可以在windows中使用mouse_event函数,但是我还没有光标的可视化表示。

I found that I can use the mouse_event Function in windows, but I still don't have the visual representation of the cursor.

推荐答案

p>游标只是资源。以下是可以使用的标准游标的良好列表。 TControl定义可以设置为在给定控件上应使用的游标的游标属性。您还可以使用Screen.Cursor来控制整个应用程序光标。

Cursors are just resources. Here is a good list of the standard cursors that can be used. TControl Defines a cursor property that can be set to the cursor that should be used when over a given control. You can also use Screen.Cursor to control the entire application cursor.

要定义自定义光标,请使用以下代码。

To define a custom cursor you use the following code.

{$R MyCustomCursors.RES}

const
 crCustom1 = 1;
 crCustom2 = 2; 

...

  Screen.Cursors[crCustom1] := LoadCursor(hInstance, 'CUSTOM1');
  Screen.Cursors[crCustom2] := LoadCursor(hInstance, 'CUSTOM2');

...

Delphi默认不处理多个鼠标指针,但我怀疑大多数环境都不是。你提到的SDK是我在单个应用程序中同时使用多个鼠标时看到的唯一信息来源。但是它只是.NET的,所以使用它将需要Delphi Prism。

Delphi was not designed by default to deal with multiple mouse pointers, but the I suspect most environments are not. The SDK you mention is the only source of information I have seen on using multiple mice at the same time in a single application. It however is .NET only, so using it would require Delphi Prism.

如果你想滚动自己的支持多个鼠标,使用WM_INPUT的同样的伎俩可以用过的。 Windows将两个鼠标作为相同。您必须手动为第二个鼠标自定义绘制鼠标光标。

If you want to roll your own support for multiple mice the same trick of using WM_INPUT can can be used. Windows will treat both mice as the same. You will have to do custom painting of the mouse cursor by hand for the second mouse.

这篇关于多个鼠标/鼠标/光标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆