код (Отобразить)
CODE:
function getmessage(1, WM_CREATE)
{
Object_Group1 = CreateWindow(0, "BUTTON", "", BS_GROUPBOX | WS_CHILD | WS_VISIBLE , 10, 10, 350, 160, gethwnd(1), 0, 0, 0);
Object_Combobox1 = CreateWindow(0, "COMBOBOX", "", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_BORDER, 10, 20, 120, 60, Object_Group1, 0, 0, 0);
for(int i=0; i<sizearray(Text_Combobox1); i++)
{
strcpy(#Bute_Combobox1[0], Text_Combobox1[i]);
sendmessage(CB_ADDSTRING, 0, address(#Bute_Combobox1[0]), formatiw(Object_Combobox1));
}
Object_Checkbox1 = CreateWindow(0, "BUTTON", "", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, 10, 50, 320, 20, Object_Group1, 0, 0, 0);
Object_Checkbox2 = CreateWindow(0, "BUTTON", "", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, 10, 70, 320, 20, Object_Group1, 0, 0, 0);
Object_Checkbox3 = CreateWindow(0, "BUTTON", "", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, 10, 90, 320, 20, Object_Group1, 0, 0, 0);
Object_Checkbox4 = CreateWindow(0, "BUTTON", "", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, 10, 110, 320, 20, Object_Group1, 0, 0, 0);
Object_Checkbox5 = CreateWindow(0, "BUTTON", "", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, 10, 130, 320, 20, Object_Group1, 0, 0, 0);
Object_Checkbox6 = CreateWindow(0, "BUTTON", "", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, 10, 175, 350, 20, gethwnd(1), 0, 0, 0);
Object_Checkbox7 = CreateWindow(0, "BUTTON", "", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, 10, 195, 350, 20, gethwnd(1), 0, 0, 0);
Object_Checkbox8 = CreateWindow(0, "BUTTON", "", BS_AUTOCHECKBOX | WS_VISIBLE | WS_CHILD, 20, 215, 270, 20, gethwnd(1), 0, 0, 0);
Object_Edit1 = CreateWindow(0, "EDIT", "", ES_WANTRETURN | ES_MULTILINE | WS_HSCROLL | WS_VSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 295, 215, 185, 70, gethwnd(1), 0, 0, 0);
Object_Static2 = CreateWindow(0, "STATIC", "0", WS_VISIBLE | WS_CHILD, 485, 215, 30, 20, gethwnd(1), 0, 0, 0);
}
//-----------------------------------------------------------------------------------------------------------------------------------------------------
function getmessage(1, WM_CLOSE)
{
MainWindow = window ("");
//Status_Combobox1 = sendmessage(CB_GETCURSEL, 0, 0, formatiw(Object_Combobox1));
Status_Combobox1 = SendMessage(Object_Combobox1, CB_GETCURSEL, 0, 0);
Status_Checkbox1 = SendMessage(Object_Checkbox1, BM_GETSTATE, 0, 0);
Status_Checkbox2 = SendMessage(Object_Checkbox2, BM_GETSTATE, 0, 0);
Status_Checkbox3 = SendMessage(Object_Checkbox3, BM_GETSTATE, 0, 0);
Status_Checkbox4 = SendMessage(Object_Checkbox4, BM_GETSTATE, 0, 0);
Status_Checkbox5 = SendMessage(Object_Checkbox5, BM_GETSTATE, 0, 0);
Status_Checkbox6 = SendMessage(Object_Checkbox6, BM_GETSTATE, 0, 0);
Status_Checkbox7 = SendMessage(Object_Checkbox7, BM_GETSTATE, 0, 0);
Status_Checkbox8 = SendMessage(Object_Checkbox8, BM_GETSTATE, 0, 0);
SendMessage(Object_Edit1, WM_GETTEXT, sizearray(Text_Edit1), address(#Text_Edit1[0]));
WritePrivateProfileString ("Default", "Object_Combobox1", format(Status_Combobox1), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Checkbox1", format(Status_Checkbox1), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Checkbox2", format(Status_Checkbox2), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Checkbox3", format(Status_Checkbox3), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Checkbox4", format(Status_Checkbox4), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Checkbox5", format(Status_Checkbox5), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Checkbox6", format(Status_Checkbox6), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Checkbox7", format(Status_Checkbox7), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Checkbox8", format(Status_Checkbox8), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Edit1", format(#Text_Edit1[0]), PathSaveSettings);
EnableWindow(formatwi(MainWindow), 1);
hidedialog(1);
}
{
Object_Group1 = CreateWindow(0, "BUTTON", "", BS_GROUPBOX | WS_CHILD | WS_VISIBLE , 10, 10, 350, 160, gethwnd(1), 0, 0, 0);
Object_Combobox1 = CreateWindow(0, "COMBOBOX", "", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_BORDER, 10, 20, 120, 60, Object_Group1, 0, 0, 0);
for(int i=0; i<sizearray(Text_Combobox1); i++)
{
strcpy(#Bute_Combobox1[0], Text_Combobox1[i]);
sendmessage(CB_ADDSTRING, 0, address(#Bute_Combobox1[0]), formatiw(Object_Combobox1));
}
Object_Checkbox1 = CreateWindow(0, "BUTTON", "", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, 10, 50, 320, 20, Object_Group1, 0, 0, 0);
Object_Checkbox2 = CreateWindow(0, "BUTTON", "", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, 10, 70, 320, 20, Object_Group1, 0, 0, 0);
Object_Checkbox3 = CreateWindow(0, "BUTTON", "", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, 10, 90, 320, 20, Object_Group1, 0, 0, 0);
Object_Checkbox4 = CreateWindow(0, "BUTTON", "", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, 10, 110, 320, 20, Object_Group1, 0, 0, 0);
Object_Checkbox5 = CreateWindow(0, "BUTTON", "", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, 10, 130, 320, 20, Object_Group1, 0, 0, 0);
Object_Checkbox6 = CreateWindow(0, "BUTTON", "", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, 10, 175, 350, 20, gethwnd(1), 0, 0, 0);
Object_Checkbox7 = CreateWindow(0, "BUTTON", "", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, 10, 195, 350, 20, gethwnd(1), 0, 0, 0);
Object_Checkbox8 = CreateWindow(0, "BUTTON", "", BS_AUTOCHECKBOX | WS_VISIBLE | WS_CHILD, 20, 215, 270, 20, gethwnd(1), 0, 0, 0);
Object_Edit1 = CreateWindow(0, "EDIT", "", ES_WANTRETURN | ES_MULTILINE | WS_HSCROLL | WS_VSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 295, 215, 185, 70, gethwnd(1), 0, 0, 0);
Object_Static2 = CreateWindow(0, "STATIC", "0", WS_VISIBLE | WS_CHILD, 485, 215, 30, 20, gethwnd(1), 0, 0, 0);
}
//-----------------------------------------------------------------------------------------------------------------------------------------------------
function getmessage(1, WM_CLOSE)
{
MainWindow = window ("");
//Status_Combobox1 = sendmessage(CB_GETCURSEL, 0, 0, formatiw(Object_Combobox1));
Status_Combobox1 = SendMessage(Object_Combobox1, CB_GETCURSEL, 0, 0);
Status_Checkbox1 = SendMessage(Object_Checkbox1, BM_GETSTATE, 0, 0);
Status_Checkbox2 = SendMessage(Object_Checkbox2, BM_GETSTATE, 0, 0);
Status_Checkbox3 = SendMessage(Object_Checkbox3, BM_GETSTATE, 0, 0);
Status_Checkbox4 = SendMessage(Object_Checkbox4, BM_GETSTATE, 0, 0);
Status_Checkbox5 = SendMessage(Object_Checkbox5, BM_GETSTATE, 0, 0);
Status_Checkbox6 = SendMessage(Object_Checkbox6, BM_GETSTATE, 0, 0);
Status_Checkbox7 = SendMessage(Object_Checkbox7, BM_GETSTATE, 0, 0);
Status_Checkbox8 = SendMessage(Object_Checkbox8, BM_GETSTATE, 0, 0);
SendMessage(Object_Edit1, WM_GETTEXT, sizearray(Text_Edit1), address(#Text_Edit1[0]));
WritePrivateProfileString ("Default", "Object_Combobox1", format(Status_Combobox1), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Checkbox1", format(Status_Checkbox1), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Checkbox2", format(Status_Checkbox2), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Checkbox3", format(Status_Checkbox3), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Checkbox4", format(Status_Checkbox4), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Checkbox5", format(Status_Checkbox5), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Checkbox6", format(Status_Checkbox6), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Checkbox7", format(Status_Checkbox7), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Checkbox8", format(Status_Checkbox8), PathSaveSettings);
WritePrivateProfileString ("Default", "Object_Edit1", format(#Text_Edit1[0]), PathSaveSettings);
EnableWindow(formatwi(MainWindow), 1);
hidedialog(1);
}