CODE:#define WS_VISIBLE 268435456
#define WS_CHILD 1073741824
#define TCIF_TEXT 1
#define TCIF_IMAGE 2
#define TCM_INSERTITEMA 4871
#define TCM_SETIMAGELIST 4867
#define IMAGE_ICON 1
#define ILC_MASK 1
#define LVSIL_SMALL 1
#define ILC_COLOR32 32
#define IMAGE_ICON 1
#define LR_LOADFROMFILE 16
#define IDI_INFORMATION 32516
#define IDI_WARNING 32515
#define IDI_SHIELD 32518
#define RUSSIAN_CHARSET 204
#define TCM_INSERTITEM 4871
#define TCM_GETITEMCOUNT 4868
#define TCM_DELETEITEM 4872
#define TCM_GETCURSEL 4875
#define TCM_SETITEMA 4870
external(INT, "LoadIcon", "LoadIconA", "User32.dll");
external(INT, "LoadImage", "LoadImageA", "User32.dll");
external(INT, "CreateWindow", "CreateWindowExA", "User32.dll");
external(INT, "ImageList_Create", "ImageList_Create", "Comctl32.dll");
external(INT, "ImageList_ReplaceIcon", "ImageList_ReplaceIcon", "Comctl32.dll");
external(INT, "CreateFont", "CreateFontA", "Gdi32.dll" );
external(INT, "MoveWindow", "MoveWindow", "User32.dll");
string text_tab[3] = {"Íîâàÿ âêëàäêà", "Íîâàÿ âêëàäêà"};
char text_tab_c[99];
int TCITEMA[7] = {TCIF_TEXT | TCIF_IMAGE, 0, 0, address(#text_tab_c[0]), size(#text_tab_c[0]), 0, 0}
int Object_Tab1;
int Object_Button1;
int Object_Button2;
createdialog(0);
showdialog(0, "Dialog", 300, 300, 450, 300, 1, 1);
int Coordinates_plus[4];
Coordinates_plus[0] = 10; Coordinates_plus[1] = 12; Coordinates_plus[2] = 20; Coordinates_plus[3] = 20;
loop()sleep(100);
function getmessage(0, WM_CREATE)
{
Object_Tab1 = CreateWindow(0, "SysTabControl32", "", WS_VISIBLE | WS_CHILD, 10, 10, 380, 150, gethwnd(0), 0, 0, 0);
Object_Button1 = CreateWindow(0, "BUTTON", "+", WS_VISIBLE | WS_CHILD, 10, 12, 20, 20, gethwnd(0), 0, 0, 0);
Object_Button2 = CreateWindow(0, "BUTTON", "õ", WS_VISIBLE | WS_CHILD, 370, 12, 20, 20, gethwnd(0), 0, 0, 0);
}
function getmessage(0, WM_COMMAND)
{
if (message.lparam == Object_Button1)
{
strcpy(#text_tab_c[0], text_tab[1]);
TCITEMA[5]=1;
sendmessage(TCM_INSERTITEMA, 1, address(#TCITEMA[0]), formatiw(Object_Tab1));
Coordinates_plus[0] = Coordinates_plus[0]+120;
MoveWindow(Object_Button1, Coordinates_plus[0], Coordinates_plus[1], Coordinates_plus[2], Coordinates_plus[3]);
if (sendmessage(TCM_GETITEMCOUNT, 0, 0, formatiw(Object_Tab1)) == 2)
{
MoveWindow(Object_Button1, 0, 0, 0, 0);
}
}
}
function getmessage (0, WM_MOVE)
{
pause(100);
}