CODE:#define WS_VISIBLE 268435456
#define WS_CHILD 1073741824
#define WS_BORDER 8388608
#define PS_SOLID 0
#define PS_NULL 5
#define SRCCOPY 13369376
#define TRANSPARENT 1
#define DT_CENTER 1
#define RUSSIAN_CHARSET 204
external(INT, "CreateWindow", "CreateWindowExA", "User32.dll");
external(INT, "GetDC", "GetDC", "User32.dll");
external(INT, "CreatePen", "CreatePen", "Gdi32.dll");
external(INT, "CreateSolidBrush", "CreateSolidBrush", "Gdi32.dll");
external(INT, "SelectObject", "SelectObject", "Gdi32.dll");
external(INT, "RoundRect", "RoundRect", "Gdi32.dll");
external(INT, "Rectangle", "Rectangle", "Gdi32.dll");
external(INT, "PtInRect", "PtInRect", "User32.dll");
external(INT, "BitBlt", "BitBlt", "Gdi32.dll");
external(INT, "CreateCompatibleDC", "CreateCompatibleDC", "Gdi32.dll");
external(INT, "CreateCompatibleBitmap", "CreateCompatibleBitmap", "Gdi32.dll");
external(INT, "DrawText", "DrawTextA", "User32.dll");
external(INT, "SetTextColor", "SetTextColor", "Gdi32.dll");
external(INT, "SetBkMode", "SetBkMode", "Gdi32.dll");
external(INT, "CreateFont", "CreateFontA", "Gdi32.dll" );
external(INT, "Ellipse", "Ellipse", "Gdi32.dll");
#definefile "C:\Users\Home\Desktop\kibor_set\Constants.txt";
int h_font, old_font;
int mouseX, mouse_Y;
int hdc, hdc_mem, hdc_bitmap;
int pen, brush1, brush2, brush_fon, old_pen, old_brush;
pen = CreatePen(PS_NULL, 0, 0);
brush_fon = CreateSolidBrush(14013909);
brush1 = CreateSolidBrush(4307199);
brush2 = CreateSolidBrush(3309517);
int current_tab = 0;
int rect_tab[3][4];
rect_tab[0][0]=25; rect_tab[0][1]=10; rect_tab[0][2]=150; rect_tab[0][3]=40;
//rect_tab[1][0]=155; rect_tab[1][1]=10; rect_tab[1][2]=235; rect_tab[1][3]=40;
//rect_tab[2][0]=240; rect_tab[2][1]=15; rect_tab[2][2]=255; rect_tab[2][3]=30;//240 10 320 40
string text_tab[3] = {"Ïóñòàÿ âêëàäêà", "1", "+"};
string Control_text_buttons[2] = {"+", "-"};
int cord_control_buttons[2][4];
cord_control_buttons[0][0] = 171; cord_control_buttons[0][1] = 10; cord_control_buttons[0][2] = 150; cord_control_buttons[0][3] = 31;//+
//cord_control_buttons[1][0] = 10; cord_control_buttons[1][1] = 10; cord_control_buttons[1][2] = 10; cord_control_buttons[1][3] = 10;//-
int image_width = 600;
int image_height = 500;
createdialog(0);
showdialog(0, "BALLOON BOT", 200, 200, 515, 500, 1, 1);
enabletimer(0);
//-----------------------------------------------------------------------------------------------------------------------------------------------------
loop()
{
sleep(10);
}
//-----------------------------------------------------------------------------------------------------------------------------------------------------
function getmessage(0, WM_CREATE)
{
hdc = GetDC(gethwnd(0));
hdc_mem = CreateCompatibleDC(hdc);
hdc_bitmap = CreateCompatibleBitmap(hdc, image_width, image_height);
SelectObject(hdc_mem, hdc_bitmap);
SetBkMode(hdc_mem, TRANSPARENT);
h_font = CreateFont(-14, 0, 0, 0, 500, 0, 0, 0, RUSSIAN_CHARSET, 0, 0, 0, 0, "Comic Sans MS");
}
//-----------------------------------------------------------------------------------------------------------------------------------------------------
function getmessage(0, WM_MOVE)
{
pause(100);
}
//-----------------------------------------------------------------------------------------------------------------------------------------------------
CREATE_TIMER(0, 30)
{
if(getkeystate(1))
{
while(getkeystate(1))
{
sleep(10);
}
for(int tab_=0; tab_<sizearray(rect_tab); tab_++)
{
getmouse(mouseX, mouse_Y, formatiw(gethwnd(0)));
if(PtInRect(address(#rect_tab[tab_][0]), mouseX, mouse_Y))
{
current_tab=tab_;
break;
}
//======
if(PtInRect(address(#cord_control_buttons[0][0]), mouseX, mouse_Y))
{
messagebox(1);
break;
}
}
}
paint();
}
//-----------------------------------------------------------------------------------------------------------------------------------------------------
function paint()
{
old_pen = SelectObject(hdc_mem, pen);
old_brush = SelectObject(hdc_mem, brush_fon);
Rectangle(hdc_mem, 0, 0, image_width+1, image_height+1);
SelectObject(hdc_mem, old_brush);
for(int i=0; i<sizearray(rect_tab); i++)
{
if(i == current_tab)
{
old_brush = SelectObject(hdc_mem, brush1);
}
else
{
old_brush = SelectObject(hdc_mem, brush2);
}
RoundRect(hdc_mem, rect_tab[i][0], rect_tab[i][1], rect_tab[i][2], rect_tab[i][3], 10, 10);
SelectObject(hdc_mem, old_brush);
SetTextColor(hdc_mem, 0);
old_font = SelectObject(hdc_mem, h_font);
DrawText(hdc_mem, text_tab[i], size(text_tab[i]), address(#rect_tab[i][0]), DT_CENTER);
//SelectObject(hdc_mem, old_font);
}
old_brush = SelectObject(hdc_mem, brush1);
RoundRect(hdc_mem, 10, 30, 500, 250, 10, 10);
RoundRect(hdc_mem, 171, 10, 150, 31, 10, 10);
//Ellipse(hdc_mem, 41, 10, 20, 31);
//Ellipse(hdc_mem, 171, 10, 150, 31);
DrawText(hdc_mem, Control_text_buttons[0], size(Control_text_buttons[0]), address(#cord_control_buttons[0][0]), DT_CENTER);//Äîáâàèòü + âîçëå âêëàäêè
SelectObject(hdc_mem, old_brush);
SelectObject(hdc_mem, old_pen);
BitBlt(hdc, 0, 0, image_width, image_height, hdc_mem, 0, 0, SRCCOPY);
}
//-----------------------------------------------------------------------------------------------------------------------------------------------------