Article View: borland.public.cppbuilder.nativeapi
Article #2542Re: RegisterRawInputDevices WM_INPUT ????
From: Jonathan Dumaresq
Date: Mon, 12 Feb 2007 15:18
Date: Mon, 12 Feb 2007 15:18
40 lines
1917 bytes
1917 bytes
>
>> void WindowProc(TMessage &msg);
>
> TForm inherits a WindowProc property from TControl. You cannot
> declare a method with the same name. You should override the virtual
> WndProc() method instead.
good. I have found it after posting it.
>
>> RAWINPUTDEVICE Rid;
>
> You should always zero out API structures before using them:
I have do it also.
>> Rid.hwndTarget = NULL;
i think this was my error. The first time i try it i put 'this' instead of
Handle.
>> if (RegisterRawInputDevices(&Rid, 1, sizeof(Rid)) == FALSE)
>> {
>> //registration failed. Call GetLastError for the cause of the
> error.
>> ShowMessage("error");
>> }
>
> You did not say which error is actually being reported.
I have not put it because i have no error.
BUT THANKS AGAIN GAMBIT. this is now working. I got my event :)
do i have to put something at the end of the wndproc to redispatch the
messages ?
regards
Jonathan
Technical Details
Message-ID:
<45d084a8$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!homer!news.glorb.com!news-spur1.glorb.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<45ccf77e$1@newsgroups.borland.com> <45cd0089$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,326f860468e16051 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Jonathan Dumaresq" <jdumaresq@cimeq.qc.ca_nospam> Newsgroups: borland.public.cppbuilder.nativeapi References: <45ccf77e$1@newsgroups.borland.com> <45cd0089$1@newsgroups.borland.com> Subject: Re: RegisterRawInputDevices WM_INPUT ???? Date: Mon, 12 Feb 2007 10:18:58 -0500 Lines: 42 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 205.237.245.110 Message-ID: <45d084a8$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1171293352 205.237.245.110 (12 Feb 2007 07:15:52 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!homer!news.glorb.com!news-spur1.glorb.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail