Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. [Touchdisplay] Right mouseclick on CView not working

[Touchdisplay] Right mouseclick on CView not working

Scheduled Pinned Locked Moved C / C++ / MFC
mobilequestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kreatief
    wrote on last edited by
    #1

    Hi, I have a CView and some objects on it with a right click behaviour, using overwritten method OnRButtonDown(UINT nFlags, CPoint point). But its not working on a windows8 tablet with touchdisplay (selecting object and keeping finger pressed for some seconds). Doubleclick and stuff is working, just not the right mouseclick. But its working in standard comboboxes. Are there any special events that I have to implement in order to catch the right mouseclick? Thank you!

    J 1 Reply Last reply
    0
    • K Kreatief

      Hi, I have a CView and some objects on it with a right click behaviour, using overwritten method OnRButtonDown(UINT nFlags, CPoint point). But its not working on a windows8 tablet with touchdisplay (selecting object and keeping finger pressed for some seconds). Doubleclick and stuff is working, just not the right mouseclick. But its working in standard comboboxes. Are there any special events that I have to implement in order to catch the right mouseclick? Thank you!

      J Offline
      J Offline
      Jochen Arndt
      wrote on last edited by
      #2

      Did you enable WM_TOUCH messages by calling RegisterTouchWindow()? Than the mapped mouse button messages are not generated.

      K 1 Reply Last reply
      0
      • J Jochen Arndt

        Did you enable WM_TOUCH messages by calling RegisterTouchWindow()? Than the mapped mouse button messages are not generated.

        K Offline
        K Offline
        Kreatief
        wrote on last edited by
        #3

        Hey, thanks for the reply. This gives me a good starting point. However, I cant seem to get it working. I registered the touch handling via

        if (!RegisterTouchWindow())

        in the overwritten OnCreate method of CMDIFrameWnd I defined the WM_TOUCH message:

        #if(WINVER >= 0x0601)
        ON_MESSAGE(WM_TOUCH, OnTouch)
        #endif

        (I checked the winver, it is correct.) But I never get to the OnTouch method. Any advice? EDIT: Interestingly it works through remote-desktop from the tablet but not as a fat client installation. No idea why though...

        J 1 Reply Last reply
        0
        • K Kreatief

          Hey, thanks for the reply. This gives me a good starting point. However, I cant seem to get it working. I registered the touch handling via

          if (!RegisterTouchWindow())

          in the overwritten OnCreate method of CMDIFrameWnd I defined the WM_TOUCH message:

          #if(WINVER >= 0x0601)
          ON_MESSAGE(WM_TOUCH, OnTouch)
          #endif

          (I checked the winver, it is correct.) But I never get to the OnTouch method. Any advice? EDIT: Interestingly it works through remote-desktop from the tablet but not as a fat client installation. No idea why though...

          J Offline
          J Offline
          Jochen Arndt
          wrote on last edited by
          #4

          It should be not necessary to use WM_TOUCH handlers. I just wanted to point out that the behaviour is as described when using them. Did you test it on multiple touch devices? Maybe the reason is a non default system setting which would also explain why it is working remotely.

          K 1 Reply Last reply
          0
          • J Jochen Arndt

            It should be not necessary to use WM_TOUCH handlers. I just wanted to point out that the behaviour is as described when using them. Did you test it on multiple touch devices? Maybe the reason is a non default system setting which would also explain why it is working remotely.

            K Offline
            K Offline
            Kreatief
            wrote on last edited by
            #5

            I dont have multiple touch devices (had to buy this one in order to be able to test). Maybe i will have to test the parameters of the RegisterTouch...() method, although I am sure it wont make a difference. Its good to know that those messages will be translated to normal mouse messages. Thanks for your support so far!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups