请教几个简单问题!!

loveandhate 2003-08-04 12:58:36
var screenx :trect;
begin
screenx:=rect(0,0,screen.width,screen.height);
clipcursor(@screenx);
end;
问题:
1.trect是什么意思?
2.rect(0,0,screen.width,screen.height)是什么意思?
3.clipcursor(@screenx)是什么意思?@代表什么?
var desktop :thandle;
taskbar :hwnd;
begin
desktop:=findwindows('progman',nil);
taskbar:=findwindows('shell_traywnd',nil);
end;
问题:
1.什么是句柄?thandle和hwnd是什么意思,有什么区别?
2.在API函数findwindows中,nil代表什么意思?
var formx :trect;
begin
formx:=form1.boundsrect;
mapwindowpoints(0,0,formx,2);
clipcursor(@formx);
end;
问题:
1.form1.boundsrect是什么意思?
2.函数mapwindowpoints是什么意思?参数都有什么含义?
...全文
57 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
大地精灵 2003-08-07
  • 打赏
  • 举报
回复
我倒,都那么详细了,看来我没的什么说了
chtlovezj 2003-08-07
  • 打赏
  • 举报
回复
不错!
niu2008 2003-08-07
  • 打赏
  • 举报
回复
这些东西在DELPHI的帮助里都有啊,
你只要检索一下就行

那里既有说明又有例子,对初学者很有用
智商无下限 2003-08-04
  • 打赏
  • 举报
回复
TRect是一个矩形类,必要参数(左,顶,右,下);同理
rect(0,0,screen.width,screen.height) 就是(0,0,屏幕的宽,屏幕的高);
clipcursor(@screenx) 限制鼠标在screenx范围内活动
什么是句柄?thandle和hwnd是什么意思,有什么区别?
handle的本意是把柄,把手的意思。是你与操作系统打交道的
东东。举个通俗的例子,比如你考上了大学,入学后,学校(操作系统)会给你一个学生
证号。注意,这个号码是学校指定的,你无法自选。HWND与上类似,可以记做相同!
在API函数findwindows中,nil代表什么意思?
nil代表空相当于NULL,也可置0;
form1.boundsrect:::窗体FORM1的RECT;
mapwindowpoints:座标换算
int MapWindowPoints(

HWND hWndFrom, // handle of window to be mapped from
HWND hWndTo, // handle of window to be mapped to
LPPOINT lpPoints, // address of structure array with points to map
UINT cPoints // number of structures in array
);




loveandhate 2003-08-04
  • 打赏
  • 举报
回复
请您翻译一下上面的英语,多谢~!
DWGZ 2003-08-04
  • 打赏
  • 举报
回复
这都看不懂吗, 你的问题真多呀
1.TRect 是一个类型 四方形
2.Rect 是一个函数
function Rect(ALeft, ATop, ARight, ABottom: Integer): TRect;
3.ClipCursor 是限制鼠标在一个四方形内, @在Delphi中表示取地址

1.一个窗口类型控件都有一个句柄, 用来标识这个控件, THandle 与 HWND 其实都是一样的它们都是LongWord类型
2.FindWindow中的nil ,表示我不需要返回窗体的类名

1.BoundRect 就是窗口四个窗的坐标形成的四方形
2.MapWindwoPoints 就是窗口坐标转换, 相对坐标
elilor 2003-08-04
  • 打赏
  • 举报
回复
1.TRect是一个矩形类型
2.得到屏幕的范围,就是一个矩形
3.将鼠标限制在这个矩形的区域内

1.句柄就是一个对象的id,
property HWND: Integer;
Description
Use HWND for Windows API calls that require a window handle. Use HWND instead of the Handle property when working with TWebBrowser controls.
2.不指定名称


1.Form1的边界矩形
2.The MapWindowPoints function converts (maps) a set of points from a coordinate space relative to one window to a coordinate space relative to another window.

int MapWindowPoints(

HWND hWndFrom, // handle of window to be mapped from
HWND hWndTo, // handle of window to be mapped to
LPPOINT lpPoints, // address of structure array with points to map
UINT cPoints // number of structures in array
);

1,184

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧