Re: Machile level exception

new topic     » goto parent     » topic index » view thread      » older message » newer message
gbonvehi said...

Hi Don,
I'm at work again and forgot to upload the source yesterday, I'll hope not to forget tonight.
Meanwhile, did you tried setting a returnValue() to the keydown handler?
You may find this interesting (quoted from Win32Lib documentation):

Setting returnValue at any stage causes processing to stop at the step that the value was set in, and return that value to Windows. Example:

          -- prevent Button1 from seeing any space bar keys 
          procedure Button1_KeyDown( integer self, integer event, sequence parms) 
              integer keycode 
              integer shift 
              keycode = parms[1] 
              shift = parms[2] 
              if keycode = VK_SPACE then 
                  -- set return value 
                  returnValue( w32True ) 
              end if 
          end procedure 
          setHandler( Button1, w32HKeyDown, routine_id("Button1_KeyDown")) 

By the way, the number for the keys are defined in w32Keys.e, VK_F5, VK_F6

Regards,
Guillermo

Thank you Guillero,

Meanwhile, did you tried setting a returnValue() to the keydown handler?

So you mean returnValue(Button1)?

I have one prograsm that In needs returnValue(-1) or it won't work right.

I don't why.

I have another program that needs returnValue(-1) or it also works with doEvents(0).

I use doEvents(0) because it uses less typing. smile

What is the difference in

returnValue(-1), returnValue(0) and returnValue(1)?

I recieved you post on hooking and am studying it.

Thank you Don Cole

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu