这些参数表示什么意思

blue风儿 2003-01-02 09:41:44
我在别人的程序上看到这样的程序段
Private Sub Pic_MouseDown(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
ReleaseCapture
SendMessage Pic.hwnd, &HA1, 2, 0&
End Sub

这样,就可以用mouse来拖动这个Pic控件。
我的问题是,SendMessage Pic.hwnd, &HA1, 2, 0& 这条命令中
&HA1, 2, 0& 这三个常量表示什么意思,也就是说具体是什么消息。


...全文
47 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
litsnake1 2003-01-03
  • 打赏
  • 举报
回复
来晚拉,同意楼上
这段代码可以实现了:以鼠标拖曳无标题窗体
pirateRocy 2003-01-03
  • 打赏
  • 举报
回复
releaseCapture
释放mouse捕获

Const WM_NCLBUTTONDOWN = &HA1
mouse左键在窗体的非客户区按下

Const HTCAPTION = 2
移动窗体的Title

就是以鼠标拖曳无标题窗体
Montaque 2003-01-03
  • 打赏
  • 举报
回复
Public Const WM_NCLBUTTONDOWN = &HA1 左键down
Public Const HTCAPTION = 2 就像移动窗体的title一样移动
suntt 2003-01-03
  • 打赏
  • 举报
回复
WM_NCLBUTTONDOWN

The WM_NCLBUTTONDOWN message is posted when the user presses the left mouse button while the cursor is within the nonclient area of a window. This message is posted to the window that contains the cursor. If a window has captured the mouse, this message is not posted.

WM_NCLBUTTONDOWN
nHittest = (INT) wParam; // hit-test value
pts = MAKEPOINTS(lParam); // position of cursor

Parameters

nHittest

Value of wParam. Specifies the hit-test value returned by the DefWindowProc function as a result of processing the WM_NCHITTEST message. For a list of hit-test values, see WM_NCHITTEST.

pts

Value of lParam. Specifies aPOINTS structure that contains the x- and y-coordinates of the cursor. The coordinates are relative to the upper-left corner of the screen.

Return Values

If an application processes this message, it should return zero

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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