Mouse Eventes Again

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

Hello List

I am using a Windows Millennium Edition.

Why I can't detect the Middle Buttom in the code below?
Any suggestion?




without warning
include win32lib.ew
constant main=create(Window,"Test",0,100,250,450,200,0),
         in=create(EditText,"",main,50,10,100,25,0),
         in2=create(EditText,"",main,50,50,390,25,0)
procedure esc(integer self, integer event, sequence params)
 --parms={integer event, integer x, integer y, integer shift, integer wheelmove}
 sequence showall
 integer params4  params4=params[4]
showall=sprintf("self=%d event=%d eventP=%d lin=%d col=%d shift=%d
 weelmove=%d",
{self,event,params[1],params[2], params[3], params[4],
                params[5]})
 if and_bits(params4,ControlMask) then           --> ctrl key was pressed
setText(in,params[4] )                         -- show params[4]when mouse
  moves
  if and_bits(params4,RightBtnMask) then         --> Right buttom down.
   setText(in,and_bits(params[4],RightBtnMask))  -- ok. ctrl+rigth show it
  elsif and_bits(params4,LeftBtnMask) then       --> Left mouse button down.  
   setText(in,and_bits(params[4],LeftBtnMask))   -- ok. ctrl+left show it
  elsif and_bits(params[4],MiddleBtnMask) then   --> Middle mouse down. 
   setText(in,and_bits(params[4],MiddleBtnMask)) -- not ok. ctrl+Middle
  end if 
 end if
 setText(in2,showall)
end procedure
setHandler(main,w32HMouse,routine_id("esc"))
WinMain({main,in2,in},Normal)

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

Search



Quick Links

User menu

Not signed in.

Misc Menu