realbasic-plugins
[Top] [All Lists]

Re: Storing global data (was Callbacks and events on Windows)

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: Storing global data (was Callbacks and events on Windows)
From: Dave Addey <listmail1 at dsl dot pipex dot com>
Date: Wed, 26 Apr 2006 16:58:30 +0100
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
Thread-index: AcZpQ7xU+wwoitU2EdqG3wAWy4bgWwABoa4I
Thread-topic: Storing global data (was Callbacks and events on Windows)
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?

Dave.

> From: Dave Addey <listmail1 at dsl dot pipex dot com>
> Reply-To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot 
> com>
> Date: Wed, 26 Apr 2006 16:11:47 +0100
> To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
> Conversation: Storing global data (was Callbacks and events on Windows)
> Subject: Re: Storing global data (was Callbacks and events on Windows)
> 
> Hi James,
> 
> That is exactly what I needed - and it seems to work :-)  Thanks!
> 
> Dave.
> 
>> From: James Milne <james dot milne at mac dot com>
>> Reply-To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot 
>> com>
>> Date: Wed, 26 Apr 2006 15:28:00 +0100
>> To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
>> Cc: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>, 
>> REALbasic
>> Plugins <realbasic-plugins at lists dot realsoftware dot com>
>> Subject: Re: Storing global data (was Callbacks and events on Windows)
>> 
>> On Wednesday, April 26, 2006, at 03:14PM, James Milne <james dot milne at 
>> mac dot com>
>> wrote:
>>>> Here's my
>>>> dilemma: how do I store these old pointers in a global way such that they
>>>> may be retrieved by the custom WindowProc? (It could then identify the
>>>> right
>>>> one to used based on the window handle passed in.)
>>>> 
>>>> If I store them in the HIDManager instance, I have no way to retrieve the
>>>> instance from within the WindowProc.  Is there anywhere else (within my
>>>> plugin code) that they could be stored and be globally available?
>>> 
>>> SetWindowData() is your friend. It allows you to store data against the
>>> Window Handle. When you create the window, call SetWindowHandle and stash
>>> your REALobject instance reference in there.
>>> 
>>> You can use GetWindowData to retrieve your REALobject instance from the HWND
>>> passed to the WndProc.
>> 
>> Sorry- the functions I meant where GetWindowLong and SetWindowLong.
>> 
>> 
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui>>
/
>> 
windowsuserinterface/windowing/windowclasses/windowclassreference/windowclass>>
f
>> unctions/setwindowlong.asp>
>> 
>> --
>> 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>
> 
> 
> _______________________________________________
> 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>


_______________________________________________
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>


<Prev in Thread] Current Thread [Next in Thread>