CODE:external(INT, "CreateWindow", "CreateWindowExA", "User32.dll" );
external(INT, "SendMessage", "SendMessageA", "User32.dll" );
external(INT, "ShowWindow", "ShowWindow", "User32.dll" );
external(INT, "IsWindowVisible", "IsWindowVisible", "User32.dll" );
#define WS_CHILD 1073741824
#define WS_VISIBLE 268435456
#define WS_DLGFRAME 4194304
#define SW_HIDE 0
#define SW_SHOW 5
int dil; //контроль диалогов
int baton1, baton2, baton3, baton4;
createdialog(0);
showdialog(0, "Диалог", 835, 390, 250, 300, 1, 1);
loop() pause(100);
function getmessage(0, WM_CREATE)
{
baton1 = CreateWindow(0, "BUTTON", "Group1",WS_VISIBLE | WS_CHILD | WS_DLGFRAME, 10, 10, 100, 30, gethwnd(0), 0, 0, 0);
baton2 = CreateWindow(0, "BUTTON", "Group2",WS_VISIBLE | WS_CHILD | WS_DLGFRAME, 100, 10, 100, 30, gethwnd(0), 0, 0, 0);
baton3 = CreateWindow(0, "BUTTON", "Button 1(Group1)",WS_VISIBLE | WS_CHILD, 10, 100, 150, 20, gethwnd(0), 0, 0, 0);
baton4 = CreateWindow(0, "BUTTON", "Button 2(Group2)",WS_VISIBLE | WS_CHILD, 10, 150, 150, 20, gethwnd(0), 0, 0, 0);
ShowWindow(baton4, SW_HIDE);
}
function getmessage(0, WM_COMMAND)
{
if (message.lparam == baton1)
{
ShowWindow(baton4, SW_HIDE);
ShowWindow(baton3, SW_SHOW);
}
//////////////////
if (message.lparam == baton2)
{
ShowWindow(baton3, SW_HIDE);
ShowWindow(baton4, SW_SHOW);
}
}