SuperKOSTYA
01-19-2007, 01:06 PM
Hi All! I'm beginner at script writing, but I need help: (лучше заменить хотя бы таким словом) heart of problem is to create of non-modal dialog window & to use drag'n'drop interface. In the given bellow code I tried to make a non-modal dialog window, but a new-created window blinks some time and disappears immediately after creating. I'm in panic, ‘cause I've spent two senseless days trying to solve the problem.
//*******************************************************
class MyDialog : GeDialog
{
public:
MyDialog(d);
CreateLayout();
AskClose();
}
MyDialog::MyDialog(d)
{
super(d);
}
//*****************************************
MyDialog::CreateLayout()
{
SetTitle("Non modal window");
AddGroupBeginV(100010,BFV_CENTER, 1, "", 0);
AddStaticText(100011, 0, 0, 0, "YO!", 0);
AddEditText(100011, 0 , 200, 10);
AddButton(1001, BFV_CENTER, 100, 10, "Button");
AddGroupEnd();
AddDlgGroup(DLG_OK | DLG_CANCEL);
return TRUE;
}
MyDialog::AskClose()
{
return FALSE;
}
main(doc,op)
{
CallCommand(13957); //Clear Console Entries
var x=new(MyDialog,1);
x->Open(true,100,100); //Open the dialog
}
//*******************************************************
class MyDialog : GeDialog
{
public:
MyDialog(d);
CreateLayout();
AskClose();
}
MyDialog::MyDialog(d)
{
super(d);
}
//*****************************************
MyDialog::CreateLayout()
{
SetTitle("Non modal window");
AddGroupBeginV(100010,BFV_CENTER, 1, "", 0);
AddStaticText(100011, 0, 0, 0, "YO!", 0);
AddEditText(100011, 0 , 200, 10);
AddButton(1001, BFV_CENTER, 100, 10, "Button");
AddGroupEnd();
AddDlgGroup(DLG_OK | DLG_CANCEL);
return TRUE;
}
MyDialog::AskClose()
{
return FALSE;
}
main(doc,op)
{
CallCommand(13957); //Clear Console Entries
var x=new(MyDialog,1);
x->Open(true,100,100); //Open the dialog
}
