CODE:
#define WS_EX_LAYERED 524288
#define PS_SOLID 0
#define LWA_ALPHA 2
#define GWL_EXSTYLE -20
#define GWL_STYLE -16
external(INT, "SetLayeredWindowAttributes", "SetLayeredWindowAttributes", "User32.dll" );
external(INT, "SetWindowLong", "SetWindowLongA", "User32.dll" );
external(INT, "GetDC", "GetDC", "User32.dll");
external(INT, "Rectangle", "Rectangle", "Gdi32.dll");
external(INT, "CreatePen", "CreatePen", "Gdi32.dll");
external(INT, "SelectObject", "SelectObject", "Gdi32.dll");
external(INT, "CreateSolidBrush", "CreateSolidBrush", "Gdi32.dll");
int color=65280; // öâåò
int trasp=100; // ïðîçðà÷íîñòü îò 0 äî 255
int coord[4]={500, 500, 700, 700}; // êîîðäèíàòû ïðÿìîóãîëüíèêà
int HDC, startX, startY, endX, endY;
createdialog(2);
enabletimer(0);
loop()sleep(10);
function getmessage(2, WM_CREATE)
{
SetWindowLong(gethwnd(2), GWL_EXSTYLE, WS_EX_LAYERED);
SetWindowLong(gethwnd(2), GWL_STYLE, 0);
SetLayeredWindowAttributes(gethwnd(2), 0, trasp, LWA_ALPHA);
HDC=GetDC(gethwnd(2));
SelectObject(HDC, CreatePen(PS_SOLID, 1, color));
SelectObject(HDC, CreateSolidBrush(color));
showdialog(2, "Äèàëîã", coord[0], coord[1], coord[2] - coord[0], coord[3] - coord[1], 1, 1);
}
CREATE_TIMER(0, 100)
{
Rectangle(HDC, 0, 0, coord[2] - coord[0], coord[3] - coord[1]);
}
#define PS_SOLID 0
#define LWA_ALPHA 2
#define GWL_EXSTYLE -20
#define GWL_STYLE -16
external(INT, "SetLayeredWindowAttributes", "SetLayeredWindowAttributes", "User32.dll" );
external(INT, "SetWindowLong", "SetWindowLongA", "User32.dll" );
external(INT, "GetDC", "GetDC", "User32.dll");
external(INT, "Rectangle", "Rectangle", "Gdi32.dll");
external(INT, "CreatePen", "CreatePen", "Gdi32.dll");
external(INT, "SelectObject", "SelectObject", "Gdi32.dll");
external(INT, "CreateSolidBrush", "CreateSolidBrush", "Gdi32.dll");
int color=65280; // öâåò
int trasp=100; // ïðîçðà÷íîñòü îò 0 äî 255
int coord[4]={500, 500, 700, 700}; // êîîðäèíàòû ïðÿìîóãîëüíèêà
int HDC, startX, startY, endX, endY;
createdialog(2);
enabletimer(0);
loop()sleep(10);
function getmessage(2, WM_CREATE)
{
SetWindowLong(gethwnd(2), GWL_EXSTYLE, WS_EX_LAYERED);
SetWindowLong(gethwnd(2), GWL_STYLE, 0);
SetLayeredWindowAttributes(gethwnd(2), 0, trasp, LWA_ALPHA);
HDC=GetDC(gethwnd(2));
SelectObject(HDC, CreatePen(PS_SOLID, 1, color));
SelectObject(HDC, CreateSolidBrush(color));
showdialog(2, "Äèàëîã", coord[0], coord[1], coord[2] - coord[0], coord[3] - coord[1], 1, 1);
}
CREATE_TIMER(0, 100)
{
Rectangle(HDC, 0, 0, coord[2] - coord[0], coord[3] - coord[1]);
}