Home Forums C Programming mouse buttons

Viewing 0 reply threads
  • Author
    Posts
    • #2174
      FerdinaStubblef
      Participant

      Hi,
      I am new. New to this forum. New to C/C++ programming. Please be kind to me.

      I have the strange situation that I do have an application which supports “script programming” based on C++ but on a limited set of commands. However, there is a “SoftwareDeveloperKit” SDK which allows to do “real” C++ programming to add new .dll with new commands for the script language. That is the way I have stumbled into the topic. So, I am currently NOT doing any C/C++ applications, but I need to code C++ to define functions.

      What I want to do is the create a function (in the script language) which simply returns 1 if the (left) mouse-button is pressed (…more accuratly: is KEPT pressed) and 0, if it isn’t. I’ve tried to fight my way through the C++ documentantion, but it all comes down to mouse-event messages sent to a specific window etc. and as far as I see, there are messages for button-down and button-up.
      Now, Is there a simple way that I can “ask” in C++: What is the current status of the mousebutton, pressed or unpressed? So that I can pass on this value as return value in the function (which defines my command in the script language)
      The problem with the messages is: a) I do not know for which window I want the mouse. b) I do not want to have this command “interfere” with whatever you are doing with the mouse. It should simply find out, if the button is currently pressed or not.
      Can anybody point me in the proper direction?

Viewing 0 reply threads
  • The forum ‘C Programming’ is closed to new topics and replies.