A tip for Windows 7 touch development

Windows 7 running on Touch PC works like this:

 

Once the vertical scroll bar is enabled on a window and comes out to work, pressing finger inside the window dose not gernerate WM_LBUTTONDOWN message at once. That is different from using the mouse device(while using the mouse, the WM_LBUTTONDOW message will be generated once you press the mouse inside the window, and the WM_LBUTTONUP message will be generated once you release the mouse).

 

Now assume that you have just pressed your finger inside the vertical scrolled window.

 

If you move your finger backward or forward first, the WM_LBUTTONDOWN message will be generated at once. And then you will do the action as mousemove with left mouse button being pressed. While you release your finger, the WM_LBUTTONUP message is generated at once. In this case, you are doing mouse moving.

 

If you move your finger upward or downward first, the WM_LBUTTONDOWN message will not be generated. Then you begin to scroll the window, and there is no WM_MOUSEMOVE message even though you move your finger backward or forward. While you release your finger, there is no WM_LBUTTONUP message generated. In this case, you are doing scrolling.

 

If you do not move your finger and just release it, there will be three messages generated in the sequence : WM_LBUTTONDOWN,

WM_MOUSEMOVE,

WM_LBUTTONUP.

 

You can test these using the Notepad.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值