public ProcessMouseMessage ( |
||
target | The Control that will receive the message | |
msg | WindowMessage | A WindowMessage that represents the message to process |
wParam | int | Specifies the WParam field of the message |
lParam | int | Specifies the LParam field of the message |
return | bool |
public override bool ProcessMouseMessage(Control target, WindowMessage msg, int wParam, int lParam)
{
if (this.DroppedDown)
{
if (msg == WindowMessage.WM_LBUTTONDOWN || msg == WindowMessage.WM_RBUTTONDOWN ||
msg == WindowMessage.WM_MBUTTONDOWN || msg == WindowMessage.WM_XBUTTONDOWN ||
msg == WindowMessage.WM_NCLBUTTONDOWN || msg == WindowMessage.WM_NCRBUTTONDOWN ||
msg == WindowMessage.WM_NCMBUTTONDOWN || msg == WindowMessage.WM_NCXBUTTONDOWN)
{
Point cursorPos = Cursor.Position;
if (!this.DropDown.Bounds.Contains(cursorPos))
{
if (target != this.EditingTable && target != this.TextBox)
{
if (this.ShouldStopEditing(target, cursorPos))
{
this.EditingTable.StopEditing();
}
}
}
}
else if (msg == WindowMessage.WM_MOUSEMOVE)
{
Point cursorPos = Cursor.Position;
if (this.DropDown.Bounds.Contains(cursorPos))
{
if (!this.containsMouse)
{
this.containsMouse = true;
this.EditingTable.RaiseCellMouseLeave(this.EditingCellPos);
}
}
else
{
this.containsMouse = true;
}
}
}
return false;
}