Page 2 of 5

how to catch mouse event in a grid ?

Posted: Fri Mar 28, 2014 4:38 pm
by Pablo César
serge_girard wrote:Little joke:

event : how to catch a mouse in a grid ?

Serge
:lol:

Re: how to catch mouse event in a grid ?

Posted: Fri Mar 28, 2014 4:42 pm
by Javier Tovar
Pablo César wrote:
serge_girard wrote:Little joke:

event : how to catch a mouse in a grid ?

Serge
:lol:
+1 BUEN CHISTE :D

Re: how to catch mouse event in a grid ?

Posted: Fri Mar 28, 2014 4:57 pm
by jpp
to serge

to catch the mouse, just include "Cheese" at first column and make some refreshes every minute....

It's really time for week_end !!!!

Re: how to catch mouse event in a grid ?

Posted: Fri Mar 28, 2014 5:27 pm
by Rathinagiri
Wonderful.

We shall include in the next release.

Thanks a lot friends.

Re: how to catch mouse event in a grid ?

Posted: Fri Mar 28, 2014 5:30 pm
by Javier Tovar
jpp wrote:
to catch the mouse, just include "Cheese" at first column and make some refreshes every minute....

Jajaja Siiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii :D :D :D

Re: how to catch mouse event in a grid ?

Posted: Fri Mar 28, 2014 6:42 pm
by srvet_claudio
Pablo César wrote: I also wish to ask to Dr. Soto if this jpp implementation:

Code: Select all

*-- Deb Jpp
      ELSEIF AT("BYPASS", UPPER( EventGetPROCNAME (nIndex))) > 0
          lProcessMessage := .T.
*-- Fin Jpp
Could be added at H_WINDOWS.PRG source lib file. What do you think about Claudio ?
Hi Pablo,
this is equivalent to:

CREATE EVENT PROCNAME cProcName HWND hWnd STOREINDEX nIndex

Code: Select all

EventSTOP  ( nIndex, lStop )

Re: how to catch mouse event in a grid ?

Posted: Fri Mar 28, 2014 8:06 pm
by Rathinagiri
Thanks for explaining Claudio. So, it is already implemented.

how to catch mouse event in a grid ?

Posted: Fri Mar 28, 2014 8:21 pm
by Pablo César
srvet_claudio wrote:this is equivalent to:

CREATE EVENT PROCNAME cProcName HWND hWnd STOREINDEX nIndex

Code: Select all

EventSTOP  ( nIndex, lStop )
Sorry Claudio, but I do not think so. How this could it be implemented in this my demo ? Would you show us please ?

I tried and was unsuccessful... :oops:

Re: how to catch mouse event in a grid ?

Posted: Sat Mar 29, 2014 5:00 am
by srvet_claudio
Pablo César wrote:
srvet_claudio wrote:this is equivalent to:

CREATE EVENT PROCNAME cProcName HWND hWnd STOREINDEX nIndex

Code: Select all

EventSTOP  ( nIndex, lStop )
Sorry Claudio, but I do not think so. How this could it be implemented in this my demo ? Would you show us please ?

I tried and was unsuccessful... :oops:
Pablo now I think I understand your demo, a Grid with Keyboard or Mouse, but not both at once.
Add in your code:

CREATE EVENT PROCNAME Check_Event_ByPass() HwND form_1.GRID_1.HANDLE STOREINDEX nIndex
EventProcessAllHookMessage (nIndex, .T.)

how to catch mouse event in a grid ?

Posted: Sat Mar 29, 2014 11:52 am
by Pablo César
Rathinagiri wrote:
srvet_claudio wrote:Pablo now I think I understand your demo, a Grid with Keyboard or Mouse, but not both at once.
Add in your code:

CREATE EVENT PROCNAME Check_Event_ByPass() HwND form_1.GRID_1.HANDLE STOREINDEX nIndex
EventProcessAllHookMessage (nIndex, .T.)
Casi, casi, pero todavia sin suceso. :(

Claudio, fijese que en mi ejemplo (utilize mi demo ejecutable) y verá que todos los eventos que fueron definidos en el demo son exibidos en el StatuBar:

- key_up
- key_down
- Mouse wheel
- Mouse move
- Mouse lbtn Down
- Mouse Rbtn Down

Claro, que tendrá que clicar en el CheckBox. Pero funcionan aparentemente normal, inclusive mouse e keyboard events.

Con su indicación de colocar: EventProcessAllHookMessage (nIndex, .T.) funcionó en partes, pero tiene comportamiento diferente al que fué indicado por jpp de adicionar:

Code: Select all

*-- Deb Jpp
      ELSEIF AT("BYPASS", UPPER( EventGetPROCNAME (nIndex))) > 0
          lProcessMessage := .T.
*-- Fin Jpp
Porque el CheckBox alterna el valor pre-definido en mi funcion Check_Event_ByPass() para que retorne al contrário.