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是什么意思?参数都有什么含义?

解决方案 »

  1.   

    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 
       );
      

  2.   

    这都看不懂吗, 你的问题真多呀
    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 就是窗口坐标转换,  相对坐标
      

  3.   

    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 
       );
      

  4.   

    这些东西在DELPHI的帮助里都有啊,
    你只要检索一下就行那里既有说明又有例子,对初学者很有用