CODE:#define WS_CHILD 1073741824
#define WS_VISIBLE 268435456
#define BS_AUTOCHECKBOX 3
#define BM_GETSTATE 242
external(INT, "CreateWindow", "CreateWindowExA", "User32.dll" );
int check1, check2;
int flag_check1=0, flag_check2=0;
createdialog(0);
showdialog(0, "Диалог",100, 100, 300, 200, 1, 1);
textbkcolor(255, 65280);
loop()
{
if(flag_check1)textout(0, 220, 135, "Галка1 нажата", 1);
else textout(0, 220, 135, "Галка1 не нажата", 1);
if(flag_check2)textout(1, 220, 175, "Галка2 нажата", 1);
else textout(1, 220, 175, "Галка2 не нажата", 1);
sleep(10);
}
function getmessage(0, WM_CREATE)
{
check1=CreateWindow(0, "BUTTON", "Галка1", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, 20, 10, 70, 20, gethwnd(0), 0, 0, 0);
check2=CreateWindow(0, "BUTTON", "Галка2", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE, 20, 50, 70, 20, gethwnd(0), 0, 0, 0);
}
function getmessage(0, WM_COMMAND)
{
if(message.lparam==check1)
{
if(flag_check1)flag_check1=0;
else flag_check1++;
return;
}
if(message.lparam==check2)
{
if(flag_check2)flag_check2=0;
else flag_check2++;
return;
}
}