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. Is there some APIs for get the force of click?

Is there some APIs for get the force of click?

Scheduled Pinned Locked Moved C / C++ / MFC
hostingcloudjsonquestion
27 Posts 6 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.
  • W whiteclouds

    Hi all! I am developing an application which will work for two monitors. The additional monitor has a touch screen. Now I want to get the force of click for it. I found it seems like some APIs can get it because some applications can respond for it. But I don't know which API(s) can do it. Is here somebody be kind to tell me? Thank you! Sincerely!

    There is some white cloud floating on the blue sky. That's the landscape I like.

    O Offline
    O Offline
    Ozer Karaagac
    wrote on last edited by
    #2

    This may be what you are looking for? SendInput()[^]

    W 1 Reply Last reply
    0
    • O Ozer Karaagac

      This may be what you are looking for? SendInput()[^]

      W Offline
      W Offline
      whiteclouds
      wrote on last edited by
      #3

      Nope... You hadn't get my meaning. I try to find a API to get the value of strength when I click the touch pad. Not insert mouse event into message-queue. :-D

      There is some white cloud floating on the blue sky. That's the landscape I like.

      O 1 Reply Last reply
      0
      • W whiteclouds

        Hi all! I am developing an application which will work for two monitors. The additional monitor has a touch screen. Now I want to get the force of click for it. I found it seems like some APIs can get it because some applications can respond for it. But I don't know which API(s) can do it. Is here somebody be kind to tell me? Thank you! Sincerely!

        There is some white cloud floating on the blue sky. That's the landscape I like.

        R Offline
        R Offline
        Rajesh R Subramanian
        wrote on last edited by
        #4

        I don't think such a thing is possible. A mouse button can either be in a depressed or a released state (same with a touch pad buttons, and clicks generated by touching somewhere on the touch area). Generally, there's no way to find out how "hard" a button was pressed. If a device is sensitive to such data, and is exposing APIs to capture that information, then that would be a different story. However, it is not the case with regular mouse and touch pad devices.

        "Real men drive manual transmission" - Rajesh.

        CPalliniC 1 Reply Last reply
        0
        • R Rajesh R Subramanian

          I don't think such a thing is possible. A mouse button can either be in a depressed or a released state (same with a touch pad buttons, and clicks generated by touching somewhere on the touch area). Generally, there's no way to find out how "hard" a button was pressed. If a device is sensitive to such data, and is exposing APIs to capture that information, then that would be a different story. However, it is not the case with regular mouse and touch pad devices.

          "Real men drive manual transmission" - Rajesh.

          CPalliniC Offline
          CPalliniC Offline
          CPallini
          wrote on last edited by
          #5

          Touch screen devices usually report the touch pressure.

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
          [My articles]

          In testa che avete, signor di Ceprano?

          T R 2 Replies Last reply
          0
          • W whiteclouds

            Hi all! I am developing an application which will work for two monitors. The additional monitor has a touch screen. Now I want to get the force of click for it. I found it seems like some APIs can get it because some applications can respond for it. But I don't know which API(s) can do it. Is here somebody be kind to tell me? Thank you! Sincerely!

            There is some white cloud floating on the blue sky. That's the landscape I like.

            CPalliniC Offline
            CPalliniC Offline
            CPallini
            wrote on last edited by
            #6

            Have you checked if the vendor provides a library to access touch screen functionalities?

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
            [My articles]

            In testa che avete, signor di Ceprano?

            A R 2 Replies Last reply
            0
            • W whiteclouds

              Hi all! I am developing an application which will work for two monitors. The additional monitor has a touch screen. Now I want to get the force of click for it. I found it seems like some APIs can get it because some applications can respond for it. But I don't know which API(s) can do it. Is here somebody be kind to tell me? Thank you! Sincerely!

              There is some white cloud floating on the blue sky. That's the landscape I like.

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #7

              AFAIK and i too agree with rajesh, there is no such api's in windows.. but might be your touch screen vendor may be providing these type of library if your client are intrested in same type of functionality

              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
              Never mind - my own stupidity is the source of every "problem" - Mixture

              cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

              1 Reply Last reply
              0
              • CPalliniC CPallini

                Touch screen devices usually report the touch pressure.

                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                [My articles]

                T Offline
                T Offline
                ThatsAlok
                wrote on last edited by
                #8

                CPallini wrote:

                Touch screen devices usually report the touch pressure

                Agree, however these shouldn't be any inbuilt functionality in the windows for same!

                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                Never mind - my own stupidity is the source of every "problem" - Mixture

                cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                CPalliniC 1 Reply Last reply
                0
                • W whiteclouds

                  Nope... You hadn't get my meaning. I try to find a API to get the value of strength when I click the touch pad. Not insert mouse event into message-queue. :-D

                  There is some white cloud floating on the blue sky. That's the landscape I like.

                  O Offline
                  O Offline
                  Ozer Karaagac
                  wrote on last edited by
                  #9

                  Sorry for my misunderstanding (read error) :laugh:. You mean touch pressure strength or, I think, sometimes called pressure size. I'm not sure that this is standard information beside location information reported by device. This theoretically possible feature may not be carried out by all manufacturers.

                  W 1 Reply Last reply
                  0
                  • T ThatsAlok

                    CPallini wrote:

                    Touch screen devices usually report the touch pressure

                    Agree, however these shouldn't be any inbuilt functionality in the windows for same!

                    "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                    Never mind - my own stupidity is the source of every "problem" - Mixture

                    cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                    CPalliniC Offline
                    CPalliniC Offline
                    CPallini
                    wrote on last edited by
                    #10

                    ThatsAlok Agree, however these shouldn't be any inbuilt functionality in the windows for same!

                    That's why I wrote this[^]. :)

                    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                    This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                    [My articles]

                    In testa che avete, signor di Ceprano?

                    T 1 Reply Last reply
                    0
                    • CPalliniC CPallini

                      Have you checked if the vendor provides a library to access touch screen functionalities?

                      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                      [My articles]

                      A Offline
                      A Offline
                      Albert Holguin
                      wrote on last edited by
                      #11

                      cpallini's correct... this type of information would only come from software provided by the vendor and will be vendor specific... meaning one vendor's libraries or API calls will not work with anothers

                      1 Reply Last reply
                      0
                      • CPalliniC CPallini

                        ThatsAlok Agree, however these shouldn't be any inbuilt functionality in the windows for same!

                        That's why I wrote this[^]. :)

                        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                        [My articles]

                        T Offline
                        T Offline
                        ThatsAlok
                        wrote on last edited by
                        #12

                        CPallini wrote:

                        That's why I wrote this[^].

                        Apology... not able to see it :-)

                        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
                        Never mind - my own stupidity is the source of every "problem" - Mixture

                        cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                        1 Reply Last reply
                        0
                        • CPalliniC CPallini

                          Touch screen devices usually report the touch pressure.

                          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                          [My articles]

                          R Offline
                          R Offline
                          Rajesh R Subramanian
                          wrote on last edited by
                          #13

                          CPallini wrote:

                          Touch screen devices usually report the touch pressure.

                          Wrong. If you can provide an API link on MSDN to support your theory, I'll be happy to read it. The need for applying "pressure" comes from using a touch screen that is based on resistive touch technology. In this case, the pressure applied will bring two different electrical layers together at one point, and when they touch, there's a change in the electrical current there, which is registered as a "touch". No matter how hard or gently you touch, the event is going to be either touched, or not. There's no way to measure the pressure. If I were to use a capacitative touch screen, it works based on the weak electric signals emitted from the skin. Now, where is the pressure on that?

                          "Real men drive manual transmission" - Rajesh.

                          CPalliniC 1 Reply Last reply
                          0
                          • CPalliniC CPallini

                            Have you checked if the vendor provides a library to access touch screen functionalities?

                            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                            [My articles]

                            R Offline
                            R Offline
                            Rajesh R Subramanian
                            wrote on last edited by
                            #14

                            CPallini wrote:

                            Have you checked if the vendor provides a library to access touch screen functionalities?

                            Well, that's the same thing I said as well in my reply to the OP. And, that would be the only possibility. :) If a device is sensitive to such data, and is exposing APIs to capture that information, then that would be a different story. However, it is not the case with regular mouse and touch pad devices.

                            "Real men drive manual transmission" - Rajesh.

                            1 Reply Last reply
                            0
                            • R Rajesh R Subramanian

                              CPallini wrote:

                              Touch screen devices usually report the touch pressure.

                              Wrong. If you can provide an API link on MSDN to support your theory, I'll be happy to read it. The need for applying "pressure" comes from using a touch screen that is based on resistive touch technology. In this case, the pressure applied will bring two different electrical layers together at one point, and when they touch, there's a change in the electrical current there, which is registered as a "touch". No matter how hard or gently you touch, the event is going to be either touched, or not. There's no way to measure the pressure. If I were to use a capacitative touch screen, it works based on the weak electric signals emitted from the skin. Now, where is the pressure on that?

                              "Real men drive manual transmission" - Rajesh.

                              CPalliniC Offline
                              CPalliniC Offline
                              CPallini
                              wrote on last edited by
                              #15

                              Pressure is computed, see, for instance http://www.analog.com/static/imported-files/data_sheets/AD7877.pdf[^], "TOUCH-PRESSURE MEASUREMENT" section. :)

                              If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                              This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                              [My articles]

                              In testa che avete, signor di Ceprano?

                              R 2 Replies Last reply
                              0
                              • CPalliniC CPallini

                                Pressure is computed, see, for instance http://www.analog.com/static/imported-files/data_sheets/AD7877.pdf[^], "TOUCH-PRESSURE MEASUREMENT" section. :)

                                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                                [My articles]

                                R Offline
                                R Offline
                                Rajesh R Subramanian
                                wrote on last edited by
                                #16

                                That is for devices manufactured by a certain company. I indicated in my first post that such things are possible if the manufacturer has implemented such a feature and is exposing APIs to capture those details. However, that would be an edge case. But most devices are simpler, and Windows certainly does not provide you features to measure "touch pressure". Again, I'll ONLY accept an API from MSDN that tells me what the touch pressure was when a touch event happens. :)

                                "Real men drive manual transmission" - Rajesh.

                                CPalliniC 1 Reply Last reply
                                0
                                • CPalliniC CPallini

                                  Pressure is computed, see, for instance http://www.analog.com/static/imported-files/data_sheets/AD7877.pdf[^], "TOUCH-PRESSURE MEASUREMENT" section. :)

                                  If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                                  This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                                  [My articles]

                                  R Offline
                                  R Offline
                                  Rajesh R Subramanian
                                  wrote on last edited by
                                  #17

                                  This time, I win! :laugh:

                                  "Real men drive manual transmission" - Rajesh.

                                  1 Reply Last reply
                                  0
                                  • R Rajesh R Subramanian

                                    That is for devices manufactured by a certain company. I indicated in my first post that such things are possible if the manufacturer has implemented such a feature and is exposing APIs to capture those details. However, that would be an edge case. But most devices are simpler, and Windows certainly does not provide you features to measure "touch pressure". Again, I'll ONLY accept an API from MSDN that tells me what the touch pressure was when a touch event happens. :)

                                    "Real men drive manual transmission" - Rajesh.

                                    CPalliniC Offline
                                    CPalliniC Offline
                                    CPallini
                                    wrote on last edited by
                                    #18

                                    Rajesh R Subramanian wrote:

                                    Again, I'll ONLY accept an API from MSDN that tells me what the touch pressure was when a touch event happens.

                                    Unfortunately what you require is not, in my opinion, what the OP has asked for ;P

                                    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                                    This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                                    [My articles]

                                    In testa che avete, signor di Ceprano?

                                    R 1 Reply Last reply
                                    0
                                    • CPalliniC CPallini

                                      Rajesh R Subramanian wrote:

                                      Again, I'll ONLY accept an API from MSDN that tells me what the touch pressure was when a touch event happens.

                                      Unfortunately what you require is not, in my opinion, what the OP has asked for ;P

                                      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                                      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                                      [My articles]

                                      R Offline
                                      R Offline
                                      Rajesh R Subramanian
                                      wrote on last edited by
                                      #19

                                      CPallini wrote:

                                      Unfortunately what you require is not, in my opinion, what the OP has asked for

                                      Of course, it is. The OP asked a question that is more general (and not specific to devices built by the analog.com company). :)

                                      "Real men drive manual transmission" - Rajesh.

                                      CPalliniC 1 Reply Last reply
                                      0
                                      • R Rajesh R Subramanian

                                        CPallini wrote:

                                        Unfortunately what you require is not, in my opinion, what the OP has asked for

                                        Of course, it is. The OP asked a question that is more general (and not specific to devices built by the analog.com company). :)

                                        "Real men drive manual transmission" - Rajesh.

                                        CPalliniC Offline
                                        CPalliniC Offline
                                        CPallini
                                        wrote on last edited by
                                        #20

                                        You impertinent youngster! :mad: Well, I surrender... :-D

                                        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                                        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                                        [My articles]

                                        In testa che avete, signor di Ceprano?

                                        R 1 Reply Last reply
                                        0
                                        • CPalliniC CPallini

                                          You impertinent youngster! :mad: Well, I surrender... :-D

                                          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                                          This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                                          [My articles]

                                          R Offline
                                          R Offline
                                          Rajesh R Subramanian
                                          wrote on last edited by
                                          #21

                                          CPallini wrote:

                                          Well, I surrender...

                                          Are you French? Oh, sorry. Never mind - this surrendering is about the touch screen discussion. :laugh: Good discussion though, as usual (THHB). :)

                                          "Real men drive manual transmission" - Rajesh.

                                          CPalliniC 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