DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: qiaoguoqiang
今日帖子: 0
在线用户: 0
导航: 论坛 -> DELPHI技术 斑竹:liumazi,sephil  
作者:
男 bios (阿贡) ★☆☆☆☆ -
盒子中级会员
2004/2/9 16:19:14
标题:
这个消息是什么意思啊? 浏览:1533
加入我的收藏
楼主: procedure TForm1.wmnchittest(var msg: twmnchittest);
var
      r:trect;
      pt:tpoint;
      begin
        inherited;
       setrect(r,0,0,20,ClientHeight);
          pt.X:=msg.XPos;
          pt.Y:=msg.YPos;
          pt:=screentoclient(pt);
          if ptinrect(r,pt) then
          msg.Result:=htcaption;

        end;

有什么作用啊?
----------------------------------------------
按此在新窗口浏览图片
按此在新窗口浏览图片
作者:
男 chinahth (淡若浮云) ★☆☆☆☆ -
盒子活跃会员
2004/2/9 16:27:43
1楼: 我想和确定坐标有关吧
if button=mbleft then
   clientpoint.x:=x;
   clientpoint.y:=y;
   screenpoint:=button4.ClientToScreen(clientpoint);
   popupmenu1.popup(screenpoint.x,screenpoint.y);
我觉得有点象,你看看吧,很抱歉不能帮你哈
----------------------------------------------
-
作者:
男 lovedelphi1 (梦之铃) ★☆☆☆☆ -
盒子活跃会员
2004/2/9 16:40:25
2楼: NCHITTEST Notification

--------------------------------------------------------------------------------


The WM_NCHITTEST message is sent to a window when the cursor moves, or when a mouse button is pressed or released. If the mouse is not captured, the message is sent to the window beneath the cursor. Otherwise, the message is sent to the window that has captured the mouse.

A window receives this message through its WindowProc function. 


Syntax

WM_NCHITTEST

    WPARAM wParam
    LPARAM lParam;
    
Parameters

wParam
This parameter is not used. 
lParam
The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the screen. 

The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the screen. 
Return Value

The return value of the DefWindowProc function is one of the following values, indicating the position of the cursor hot spot. 

Value Location of hot spot 
HTBORDER In the border of a window that does not have a sizing border. 
HTBOTTOM In the lower-horizontal border of a resizable window (the user can click the mouse to resize the window vertically). 
HTBOTTOMLEFT In the lower-left corner of a border of a resizable window (the user can click the mouse to resize the window diagonally). 
HTBOTTOMRIGHT In the lower-right corner of a border of a resizable window (the user can click the mouse to resize the window diagonally). 
HTCAPTION In a title bar. 
HTCLIENT In a client area. 
HTCLOSE In a Close button. 
HTERROR On the screen background or on a dividing line between windows (same as HTNOWHERE, except that the DefWindowProc function produces a system beep to indicate an error). 
HTGROWBOX In a size box (same as HTSIZE). 
HTHELP In a Help button. 
HTHSCROLL In a horizontal scroll bar. 
HTLEFT In the left border of a resizable window (the user can click the mouse to resize the window horizontally). 
HTMENU In a menu. 
HTMAXBUTTON In a Maximize button. 
HTMINBUTTON In a Minimize button. 
HTNOWHERE On the screen background or on a dividing line between windows. 
HTREDUCE In a Minimize button. 
HTRIGHT In the right border of a resizable window (the user can click the mouse to resize the window horizontally). 
HTSIZE In a size box (same as HTGROWBOX). 
HTSYSMENU In a window menu or in a Close button in a child window. 
HTTOP In the upper-horizontal border of a window. 
HTTOPLEFT In the upper-left corner of a window border. 
HTTOPRIGHT In the upper-right corner of a window border. 
HTTRANSPARENT In a window currently covered by another window in the same thread (the message will be sent to underlying windows in the same thread until one of them returns a code that is not HTTRANSPARENT). 
HTVSCROLL In the vertical scroll bar. 
HTZOOM In a Maximize button. 



Remarks

Use the following code to obtain the horizontal and vertical position:

xPos = GET_X_LPARAM(lParam); 
yPos = GET_Y_LPARAM(lParam); 

----------------------------------------------
-
作者:
男 bios (阿贡) ★☆☆☆☆ -
盒子中级会员
2004/2/9 16:56:55
3楼: 老大 msg.Result:=htcaption;的作用是什么?
----------------------------------------------
按此在新窗口浏览图片
按此在新窗口浏览图片
作者:
男 lovedelphi1 (梦之铃) ★☆☆☆☆ -
盒子活跃会员
2004/2/9 17:18:17
4楼: 给消息返回一个此消息需要的值吧!
此帖子包含附件:
JPEG 图像
大小:46.6K
----------------------------------------------
-
作者:
男 bios (阿贡) ★☆☆☆☆ -
盒子中级会员
2004/2/9 17:28:33
5楼: 谢谢!
----------------------------------------------
按此在新窗口浏览图片
按此在新窗口浏览图片
作者:
男 d_z_x (歆歆) ★☆☆☆☆ -
盒子活跃会员
2004/2/9 19:46:52
6楼: 比较复杂,得慢慢研究学习。
----------------------------------------------
-
作者:
男 sephil (NAILY Soft) ★☆☆☆☆ -
盒子中级会员
2004/2/10 0:40:28
7楼: msg.Result:=htcaption
告诉系统点击的是窗口的标题栏
----------------------------------------------
Copyright 2008 ? NAILY Soft

Click here to redirect to my home
Click here to redirect to my blog
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行89.84375毫秒 RSS