Hi James, That is exactly what I needed - and it seems to work :-) Thanks!
Dave. > From: James Milne <[EMAIL PROTECTED]> > Reply-To: REALbasic Plugins <[email protected]> > Date: Wed, 26 Apr 2006 15:28:00 +0100 > To: REALbasic Plugins <[email protected]> > Cc: REALbasic Plugins <[email protected]>, REALbasic > Plugins <[email protected]> > Subject: Re: Storing global data (was Callbacks and events on Windows) > > On Wednesday, April 26, 2006, at 03:14PM, James Milne <[EMAIL PROTECTED]> > 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/windowclassf > 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>
