* UIControl: WIN10系统响应触摸屏增加了TouchPressClick属性,默认关闭
This commit is contained in:
parent
20ed2e0be4
commit
05011d57f8
Binary file not shown.
@ -994,6 +994,10 @@ namespace Sunny.UI
|
|||||||
this.Invalidate();
|
this.Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Description("开启后可响应某些触屏的点击事件"), Category("SunnyUI")]
|
||||||
|
[DefaultValue(false)]
|
||||||
|
public bool TouchPressClick { get; set; } = false;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
////// WndProc窗口程序:
|
////// WndProc窗口程序:
|
||||||
////// 当按压屏幕时,产生一个WM_POINTERDOWN消息时,我们通过API函数 PostMessage 投送出一个WM_LBUTTONDOWN消息
|
////// 当按压屏幕时,产生一个WM_POINTERDOWN消息时,我们通过API函数 PostMessage 投送出一个WM_LBUTTONDOWN消息
|
||||||
@ -1011,6 +1015,8 @@ namespace Sunny.UI
|
|||||||
const int WM_LBUTTONUP = 0x0202;
|
const int WM_LBUTTONUP = 0x0202;
|
||||||
|
|
||||||
protected override void WndProc(ref Message m)
|
protected override void WndProc(ref Message m)
|
||||||
|
{
|
||||||
|
if (TouchPressClick)
|
||||||
{
|
{
|
||||||
switch (m.Msg)
|
switch (m.Msg)
|
||||||
{
|
{
|
||||||
@ -1033,6 +1039,11 @@ namespace Sunny.UI
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
base.WndProc(ref m);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user