高手帮忙!

shangshu7 2003-08-05 01:55:12
按钮有两个风格。我怎么判断按牛是按下去的还是没按下去呢?它有返回值吗?怎么才能知道,如何捕捉!
...全文
55 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
zyl910 2003-08-05
  • 打赏
  • 举报
回复
BM_GETSTATE
An application sends a BM_GETSTATE message to determine the state of a button or check box.

BM_GETSTATE
wParam = 0; // not used; must be zero
lParam = 0; // not used; must be zero

Parameters
This message has no parameters.

Return Values
The return value specifies the current state of the button. You can use the following bitmasks to extract information about the state:

Value Meaning
0x0003 Specifies the check state (radio buttons and check boxes only). A value of BST_UNCHECKED indicates the button is unchecked; a value of BST_CHECKED indicates the button is checked. A radio button is checked when it contains a dot; a check box is checked when it contains an X. A value of BST_INDETERMINATE indicates the check state is indeterminate (applies only if the button has the BS_3STATE or BS_AUTO3STATE style). A three-state check box is grayed when its state is indeterminate.
BST_CHECKED Indicates the button is checked.
BST_FOCUS Specifies the focus state. A nonzero value indicates that the button has the keyboard focus.
BST_INDETERMINATE Indicates the button is grayed because the state of the button is indeterminate. This value applies only if the button has the BS_3STATE or BS_AUTO3STATE style.
BST_PUSHED Specifies the highlight state. A nonzero value indicates that the button is highlighted. A button is automatically highlighted when the user positions the cursor over it and presses and holds the left mouse button. The highlighting is removed when the user releases the mouse button.
BST_UNCHECKED Indicates the button is unchecked. Same as a return value of zero.


QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in winuser.h.

lbhqu 2003-08-05
  • 打赏
  • 举报
回复
按下去后按钮会陷下去,很容易看出来,按钮没返回值 但有点击事件
Alicky 2003-08-05
  • 打赏
  • 举报
回复
你的意思?
strongfisher 2003-08-05
  • 打赏
  • 举报
回复
Private Sub cmdActiveSave_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
MsgBox "按下"
End Sub

1,451

社区成员

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

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