Article View: borland.public.cppbuilder.multimedia
Article #401Re: Joystick Button Problems
From: Edward
Date: Thu, 09 Dec 2004 19:30
Date: Thu, 09 Dec 2004 19:30
62 lines
3087 bytes
3087 bytes
Ok Thank You Gambit. I will search some samples in Direct X. To much thinks to do and to few time to study. Edward "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:41b8a4c7$1@newsgroups.borland.com... > > "Edward" <eduglobo2004@globo.com> wrote in message > news:41b89609@newsgroups.borland.com... > >> If is illegal, why exist? > > They exist because the same VCL is shared between both Delphi and BCB, but > the VCL is written in Delphi Pascal, not C++. They are legal in Delphi, > because Delphi Pascal has different rules regarding how objects are > created > than C++ does. Being written in Pascal, the VCL in BCB follows the Delphi > rules, not the C++ rules. That is why those events are dangerous to use > in > C++ but not in Delphi. > >> I can use FormActivate in the place of FormCreate? > > The OnActivate event is not a constructor. Not only that, it can be > triggered multiple times, so you have to watch out for that. > >> void __fastcall TFormPrincipal::FormClose(TObject *Sender, TCloseAction >> &Action) > <snip> >> in the place of FormDestroy ? > > The OnClose event is not always guaranteed to be triggered. There are > situations where it is skipped, so your clean up code would not be called > at > all. That is why I told you to use the actual destructor instead. > > It seems to me that you are focusing too much on the Object Inspector and > not enough on the actual code. > >> Why i CAN NOT get the butons 5,6,7 and 8 of my USB Joystick? > > The message you are catching does not support those buttons in the first > place. It only supports the first four buttons. > > Rather than using the Joystick API, I would suggest you use DirectX > instead, > specially DirectInput. Microsoft even says that the Joystick API has been > superseded by DirectInput because it has more features for supporting > modern > technology. > > > Gambit > >
Technical Details
Message-ID:
<41b8a82b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newshosting.com!nx01.iad01.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41b88a74@newsgroups.borland.com> <41b88bd4$2@newsgroups.borland.com> <41b89609@newsgroups.borland.com> <41b8a4c7$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10d0fc,734fce58ab6581e5 X-Google-Attributes: gid10d0fc,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Edward" <eduglobo2004@globo.com> From: "Edward" <eduglobo2004@globo.com> Newsgroups: borland.public.cppbuilder.multimedia References: <41b88a74@newsgroups.borland.com> <41b88bd4$2@newsgroups.borland.com> <41b89609@newsgroups.borland.com> <41b8a4c7$1@newsgroups.borland.com> Subject: Re: Joystick Button Problems Date: Thu, 9 Dec 2004 17:30:27 -0200 Lines: 64 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 200.213.54.55 Message-ID: <41b8a82b$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1102620715 200.213.54.55 (9 Dec 2004 11:31:55 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newshosting.com!nx01.iad01.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail