Article View: borland.public.cppbuilder.nativeapi
Article #16150Re: Virtual Key problem
From: Nicholas Gessler
Date: Wed, 28 May 2003 21:49
Date: Wed, 28 May 2003 21:49
29 lines
2527 bytes
2527 bytes
Well, at the end of each ButtonDown and TimerFire event I include EditBox->SetFocus( ); Maybe could capture the VK_TAB and have it fire EditBox->SetFocus( ); also... (This application is a toy version of the game "Snake.") "Eudy Silva" <eudy@directnet.com> wrote in message news:3ED524CD.8080903@directnet.com... > Nicholas Gessler wrote: > [snip] > > Whew!!! That was a long one. I'm sure this is not the > > "proper" way to do it, but it's easy and it seems to work! > > Certainly it is not. What if the user presses TAB? > Focus will change to another control, say a Button, and > the FormOnKeyDown won't be fired for the "special" keys > anymore, until focus is back to a control which responds > properly to the WM_GETDLGCODE. > > For your workaround to work you have to avoid the EditBox > focus change and this might make the other controls on the > form useless (try coding EditBox->SetFocus() in the > EditBox OnExit event handler and see how disappointing > it is...) > > BTW, I also need to learn the proper way to do this stuff. > > Eudy >
Technical Details
Message-ID:
<3ed52eac@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!216.65.3.53.MISMATCH!news-out.spamkiller.net!propagator2-maxim!news-in.superfeed.net!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!uunet!sac.uu.net!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3ed17b8f@newsgroups.borland.com> <3ed1839d$1@newsgroups.borland.com> <3ed2e51d@newsgroups.borland.com> <3ED4DFC2.3060603@directnet.com> <3ed501cc@newsgroups.borland.com> <3ed507be@newsgroups.borland.com> <3ED51111.9080904@iae.cta> <3ed51dc9@newsgroups.borland.com> <3ED524CD.8080903@directnet.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,b34f1e4dec3a67c2 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-05-28 14:51:57 PST Reply-To: "Nicholas Gessler" <gessler@ucla.edu> From: "Nicholas Gessler" <gessler@ucla.edu> Newsgroups: borland.public.cppbuilder.nativeapi References: <3ed17b8f@newsgroups.borland.com> <3ed1839d$1@newsgroups.borland.com> <3ed2e51d@newsgroups.borland.com> <3ED4DFC2.3060603@directnet.com> <3ed501cc@newsgroups.borland.com> <3ed507be@newsgroups.borland.com> <3ED51111.9080904@iae.cta> <3ed51dc9@newsgroups.borland.com> <3ED524CD.8080903@directnet.com> Subject: Re: Virtual Key problem Date: Wed, 28 May 2003 14:49:48 -0700 Lines: 31 Organization: UCLA - Geography X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 4.60.108.106 Message-ID: <3ed52eac@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1054158508 4.60.108.106 (28 May 2003 14:48:28 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!216.65.3.53.MISMATCH!news-out.spamkiller.net!propagator2-maxim!news-in.superfeed.net!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!uunet!sac.uu.net!ash.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail