Fired whenever a mouse event occurs.
.NET Syntax
Visual Basic (Declaration) | |
---|
Public Delegate Function DMouseEvents_MouseNotifyEventHandler( _
ByVal Message As Integer, _
ByVal WParam As Integer, _
ByVal LParam As Integer _
) As Integer |
Visual Basic (Usage) | |
---|
Dim instance As New DMouseEvents_MouseNotifyEventHandler(AddressOf HandlerMethod)
|
C# | |
---|
public delegate int DMouseEvents_MouseNotifyEventHandler(
int Message,
int WParam,
int LParam
) |
C++/CLI | |
---|
public delegate int DMouseEvents_MouseNotifyEventHandler(
& int Message,
& int WParam,
& int LParam
) |
Parameters
- Message
- Message to be sent
- WParam
- Additional message-dependent information
- LParam
- X, Y in a packed long requiring unpacking; see GET_X_LPARAM and GET_Y_LPARAM in MSDN for details on how to unpack LParam
Example
The following sample code shows a possible approach to decoding WParam and LParam.
'--------------------------------------------------------------
void NotifyHandler( UINT message, WPARAM wParam, LPARAM lParam)
{
long x = GET_X_LPARAM(lParam);//Uses Windows macro
long y = GET_Y_LPARAM(lParam);//Uses Windows macro
switch(message)
{
case WM_MOUSEWHEEL:
case WM_MOUSEMOVE:
//Your code to process event
break;
case WM_LBUTTONDOWN:
//Your code to process event
break;
case WM_LBUTTONUP:
//Your code to process event
break;
case WM_RBUTTONDOWN:
//Your code to process event
break;
case WM_RBUTTONUP:
//Your code to process event
break;
case WM_MBUTTONDOWN:
//Your code to process event
break;
case WM_MBUTTONUP:
//Your code to process event
break;
case WM_LBUTTONDBLCLK:
//Your code to process event
break;
case WM_RBUTTONDBLCLK:
//Your code to process event
break;
case WM_MBUTTONDBLCLK:
//Your code to process event
break;
}
}
Example
Remarks
Availability
SolidWorks 2007 FCS, Revision Number 15.0