SRL Archive - News and General

SetGUI Parent.. Possible?


Brandon

2011-07-04 14:59:38

K I'll make this short and simple and easy to understand.. My question is that can Simba set GUI parents..

In c++ it would be the equivalent of:


#include <Windows.h>
#include <iostream>

#define REPEAT do{
#define UNTIL( condition ) }while(!(condition));
#define _WIN32_WINNT 0x0500

int main()
{
HWND console = GetConsoleWindow();

HWND Smart;
REPEAT
Smart = FindWindow("SunAwtFrame", "Public SMARTv6.6 - SMART Minimizing Autoing Resource Thing - By BenLand100");
UNTIL(Smart != 0);
if(Smart != 0)
{
SetParent(console, Smart);
}
return 0;
}
What the above does is it will set smart as the parent to the console window.. now u can do this with GUI's aswell (SmartChat was an example that I helped make).. You get the handle to the GUI and then set Smart as the parent and the co-ordinates of where the GUI will be place on the parent window..

Can Simba do this?? You make a form in simba, get the handle.. and set the parent to the form as smart? This will allow for clickable GUI's and progress reports directly on smart itself..

Possible? Or No? :c If no, whats stopping it and is there anything we can do to make it possible?

TomTuff

2011-07-04 15:18:06

Well for reports on SMART, you can paint on smart. Idk about the forms though, but why do those need to be on SMART?

MylesMadness

2011-07-04 15:20:32

From: TomTuff
Well for reports on SMART, you can paint on smart. Idk about the forms though, but why do those need to be on SMART?
Im guessing to be like rsbot and rsbuddy with interactive paint on the screen.

Brandon

2011-07-04 15:23:07

From: MylesMadness
Im guessing to be like rsbot and rsbuddy with interactive paint on the screen.


This^ That was the words I were looking for.. Interactive paint.. Can that be done though with using forms?

mastaraymond

2011-07-04 17:00:38

Yes, but since Simba is cross platform it requires a lot more work..

Nava2

2011-07-04 18:11:40

From: mastaraymond
Yes, but since Simba is cross platform it requires a lot more work..


What about implementing this java side inside smart then?

Wizzup?

2011-07-05 04:52:40

Sounds like it is possible, at least on Windows. But why would you want to do this? Do SMART and the form to control it really have to be attached?