Right Button Press event?

Hi all,

I want to respond right button press of the mouse,how can the program

know the action of the mouse? the left ,the right or the middle button?

Could somebody give me a example about the Right Click event?

thank you very much!

There is section in the documentation about this.

There are three approaches. Using Photon if you have a widget such as a button, you can connect a callback that will fire a routine when the button is pushed. Structures passed to the callback will tell you which button was pushed if you need it. A second approach is using a raw widget and making it sensitive to the events (mouse) that you want to find out about. This is more useful when you are doing something like a draw program and you want to catch drag events etc. Finally, although I have no idea of the details, there must be a way to tie into the mouse driver directly. I would only go this way if you want to use a mouse without Photon. As far as the details, as Mario corrected mentioned, check out the docs.

Thanks very much for you guys replying.

could you tell me where i can find the documentation?

I’ve read the HELP documention.But i am so stupid that can not write a programme to respond the mouse action under Photon.

Could you show me a simple example? Thanks very much!

You won’t get very far with QNX if you can’t find the documentation. There is a program called the Help Viewer which is in the menus. Once it is running, on the left side you have various choices for topics. These can be opened up to get more detail. So you want to first find the Photon documentation. Within that there are details on 1) Widgets 2) Routines. These will help later but first you want to look at the user manual which will describe widgets and callbacks as well as using the App builder.