Now you can specify the first parameter (optional) for the win pointer to any dialog and visualwindow will display the image not directly on the screen, but directly on this dialog.
You can point to both your own dialogs (not modal) so belonging to other people's programs.
An example of creating a non-modal dialog and displaying a part of the screen on it. It can be output from a file and a window.
CODE:
int pos_size_button0 [1] [4];
string text_button0 [1];
int flag_button0 [1];
pos_size_button0 [0] [0]=4; pos_size_button0 [0] [1]=110; pos_size_button0 [0] [2]=105; pos_size_button0 [0] [3]=20;
text_button0 [0]="Close";
//////////
createdialog (0, BUTTON, # pos_size_button0 [0] [0], # text_button0 [0], # flag_button0 [0]);
//////////
showdialog (0, "Our bot", 558, 234, 115, 170, 1, 1);
//////////
win aw=window ("Our bot"); // Get the pointer to our window
visualwindow (aw, 0, 0, 0, 100, 100, 5, 5, 100, -1); // Turn on the output on our window
loop ()
{
if (flag_button0 [0] == 1)
{
flag_button0 [0]=0;
disablevisualwindow (0);
sleep (100);
destroydialog (0);
goto s;
}
sleep (10); // Remove after the test
}
s:;
string text_button0 [1];
int flag_button0 [1];
pos_size_button0 [0] [0]=4; pos_size_button0 [0] [1]=110; pos_size_button0 [0] [2]=105; pos_size_button0 [0] [3]=20;
text_button0 [0]="Close";
//////////
createdialog (0, BUTTON, # pos_size_button0 [0] [0], # text_button0 [0], # flag_button0 [0]);
//////////
showdialog (0, "Our bot", 558, 234, 115, 170, 1, 1);
//////////
win aw=window ("Our bot"); // Get the pointer to our window
visualwindow (aw, 0, 0, 0, 100, 100, 5, 5, 100, -1); // Turn on the output on our window
loop ()
{
if (flag_button0 [0] == 1)
{
flag_button0 [0]=0;
disablevisualwindow (0);
sleep (100);
destroydialog (0);
goto s;
}
sleep (10); // Remove after the test
}
s:;
Warning : Closing someone else's dialog when it's outputting can lead to an error.