C
chensh
Unregistered / Unconfirmed
GUEST, unregistred user!
我用如下代码将鼠标锁在一定范围内,打开普通程序窗口时都能锁住,但在
运行帝国时代时就不能将鼠标锁住,出现锁定窗口时,随便点一下鼠标,鼠标
就自由了。怎么办?(锁定范围已经小于锁定窗口大小)
var
lockrect: Trect;
begin
SetWindowPos(Handle, Hwnd_Topmost, 0, 0, 0, 0, (SWP_NOMOVE Or SWP_NOSIZE));
lockrect:=rect(screen.width div 2-130,screen.height div 2-75,
screen.width div 2+130,screen.height div 2+75);
ClipCursor(@lockrect);
end;
运行帝国时代时就不能将鼠标锁住,出现锁定窗口时,随便点一下鼠标,鼠标
就自由了。怎么办?(锁定范围已经小于锁定窗口大小)
var
lockrect: Trect;
begin
SetWindowPos(Handle, Hwnd_Topmost, 0, 0, 0, 0, (SWP_NOMOVE Or SWP_NOSIZE));
lockrect:=rect(screen.width div 2-130,screen.height div 2-75,
screen.width div 2+130,screen.height div 2+75);
ClipCursor(@lockrect);
end;