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
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?
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?
#2
08/01/2005 (1:14 pm)
Yes, thanks, I found some examples that clarified the problem... when all else fails, RTFM
Associate Kyle Carter