how to catch mouse event in a grid ?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

how to catch mouse event in a grid ?

Post by Pablo César »

serge_girard wrote:Little joke:

event : how to catch a mouse in a grid ?

Serge
:lol:
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: how to catch mouse event in a grid ?

Post 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
jpp
Posts: 34
Joined: Thu Jan 16, 2014 3:04 pm

Re: how to catch mouse event in a grid ?

Post 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 !!!!
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: how to catch mouse event in a grid ?

Post by Rathinagiri »

Wonderful.

We shall include in the next release.

Thanks a lot friends.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México

Re: how to catch mouse event in a grid ?

Post 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
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: how to catch mouse event in a grid ?

Post 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 )
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: how to catch mouse event in a grid ?

Post by Rathinagiri »

Thanks for explaining Claudio. So, it is already implemented.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

how to catch mouse event in a grid ?

Post 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:
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: how to catch mouse event in a grid ?

Post 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.)
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

how to catch mouse event in a grid ?

Post 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.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply