Re: [ WIN ] re: onKeyPress[]
- Posted by Derek Parnell <ddparnell at bigpond.com> Jan 30, 2001
- 476 views
Hi Wolf, I quote here from the win32lib documentation... ------------------------------- If you want to to Windows to ignore the key, set the return value to -1. if find(keyCode,"0123456789") then returnValue(-1) -- ignore digits. end if If you want to to Windows to use a different key, set the return value to the new key. -- collect characters into the password, but don't show them. PassWord &= keyCode returnValue('-') -- return a dash for each character entered. --------------------- I hope this is what you're after. ------ Derek Parnell Melbourne, Australia (Vote [1] The Cheshire Cat for Internet Mascot) ----- Original Message ----- From: "Wolf" <wolfritz at KING.IGS.NET> To: "EUPHORIA" <EUforum at topica.com> Sent: Wednesday, January 31, 2001 2:53 AM Subject: [ WIN ] re: onKeyPress[] > ... in win32lib. > I recently wrote a program using the following simple... > > procedure on_key(integer key,integer shift) > if key=VK_RETURN then > my_handler() > end if > end procedure > -- > onKeyPress[button]=routine_id("on_key") > > ... and found that even after this routine was handled, the keypress was > *still* in the message queue. > > So, to get rid of this, I did the obvious: > > procedure on_key(integer key,integer shift) > atom jk > if key=VK_RETURN then > ---- dispose of message ! > jk=w32Func(xGetMessage,{MSG,getHandle(button),WM_KEYFIRST,WM_KEYLAST}) > ---- etc. > > So, my question here is: > ... if onKeyPress[] doesn't actually dispose of the message, > what in win32lib eventually does ? > > ... and could this cause some potential problems. > > Wolf > > ____________________________________________________________ > T O P I C A -- Learn More. Surf Less. > Newsletters, Tips and Discussions on Topics You Choose. > http://www.topica.com/partner/tag01 > ____________________________________________________________ T O P I C A -- Learn More. Surf Less. Newsletters, Tips and Discussions on Topics You Choose. http://www.topica.com/partner/tag01