On Wednesday, April 26, 2006, at 04:58PM, Dave Addey <listmail1 at dsl dot
pipex dot com> wrote:
>Here's another, final piece of the puzzle:
>
>The WindowProc receives Messages. DirectInput sets Events:
>
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/
>IDirectInputDevice8__SetEventNotification.asp
>
>How do the two intermix? How do I differentiate messages and events in my
>WindowProc? Or have I got the complete wrong end of the stick?
Ah, sorry. I haven't read the DirectInput documentation yet; it's been years
since I've done any work with DirectInput.
Dredging up Win32 that I've done my best in the last couple of years to
suppress:
Events are objects that you create and use to send messages between threads.
You create an Event using CreateEvent and attach it to the DirectInput device
using SetEventNotification. You later query that Event using
MsgWaitForMultipleObjects to see if anything has happened for that device. If
anything has happened, you can then query the device. Typically you call
MsgWaitForMultipleObjects from another thread, as MsgWaitForMultipleObjects can
be told to block the thread until something happens.
I'll have a better read when I get home this evening. I'll be able to advise
you better then.
--
Kind regards,
James Milne
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|