www.mxdraw.com
|
键盘被按下
[id(14)] void MxKeyDown(LONG lVk, LONG* pRet);
参数 |
说明 |
LONG lVk |
是按钮码,如F8,的值为#define VK_F8 0x77 |
返回_T("1")消息不往下传递,否则消息继续往下传递
例如: VB下,处理F1被按下的代码
Private Sub MxDrawX1_CustomEvent(ByVal sEventName As String) If sEventName = "KeyDown" Then Dim param As MxDrawXLib.MxDrawResbuf ' 得到事件参数 Set param = MxDrawX1.CustomEventParam Dim lVk As Long lVk = param.AtLong(0) ' #define VK_F1 0x70,十进制值:112 If lVk = 112 Then MsgBox "F1按下" ' 设置返回值1表示该事件不再传递处理. MxDrawX1.SetEventRetString "1" End If End If