Game Development Community

Pass hWnd to script objects?

by Rodrigo · in Torque Game Engine · 07/29/2005 (8:10 pm) · 2 replies

I'm very new to Torque so please bear with me...

Is it possible to pass the current hWnd (in Windows...) to a console object in the script? I have a special class "foo" that uses custom libraries. When I call it's constructor, I have to pass it the current hWnd that Torque is using.
eg
objA = new foo (winState.appWindow);

I'd rather not change any of the 'foo' code, but I want to expose it in torquescript. Any thoughts?

The other alternative I've been thinking of is to create in C++, but how could I manipulate a specific instance of 'foo' in code?

eg say in my C++ code from above, could I use objA in script?

#1
07/31/2005 (1:14 pm)
Have you read the Torque scripting docs? (See the Doxygen comments for SimObject).
#2
08/01/2005 (1:14 pm)
Yes, thanks, I found some examples that clarified the problem... when all else fails, RTFM