code (Отобразить)
CODE:
#define WS_CHILD 1073741824
#define WS_VISIBLE 268435456
#define WS_BORDER 8388608
external(INT, "CreateWindow", "CreateWindowExA", "User32.dll" );
external(INT, "SetWindowText", "SetWindowTextA", "User32.dll" );
int edit[2];
createdialog(0);
showdialog(0, "Диалог",350, 400, 210, 200, 1, 1);
loop()sleep(10);
function getmessage(0, WM_CREATE)
{
edit[0]=CreateWindow(0, "EDIT", "", WS_BORDER | WS_CHILD | WS_VISIBLE, 70, 10, 100, 20, gethwnd(0), 0, 0, 0);
edit[1]=CreateWindow(0, "EDIT", "", WS_BORDER | WS_CHILD | WS_VISIBLE, 70, 40, 100, 20, gethwnd(0), 0, 0, 0);
}
function getmessage(0, WM_COMMAND)
{
if(message.lparam==edit[0])
{
SetWindowText(edit[1], "0");
return;
}
if(message.lparam==edit[1])
{
SetWindowText(edit[0], "0");
return;
}
}
#define WS_VISIBLE 268435456
#define WS_BORDER 8388608
external(INT, "CreateWindow", "CreateWindowExA", "User32.dll" );
external(INT, "SetWindowText", "SetWindowTextA", "User32.dll" );
int edit[2];
createdialog(0);
showdialog(0, "Диалог",350, 400, 210, 200, 1, 1);
loop()sleep(10);
function getmessage(0, WM_CREATE)
{
edit[0]=CreateWindow(0, "EDIT", "", WS_BORDER | WS_CHILD | WS_VISIBLE, 70, 10, 100, 20, gethwnd(0), 0, 0, 0);
edit[1]=CreateWindow(0, "EDIT", "", WS_BORDER | WS_CHILD | WS_VISIBLE, 70, 40, 100, 20, gethwnd(0), 0, 0, 0);
}
function getmessage(0, WM_COMMAND)
{
if(message.lparam==edit[0])
{
SetWindowText(edit[1], "0");
return;
}
if(message.lparam==edit[1])
{
SetWindowText(edit[0], "0");
return;
}
}