CODE:#define WS_VISIBLE 268435456
#define WS_CHILD 1073741824
#define HWND_TOPMOST -1
#define SWP_NOMOVE 2
#define SWP_NOSIZE 1
external(INT, "wsprintf", "wsprintfA", "User32.dll" );
external(INT, "CreateWindow", "CreateWindowExA", "User32.dll");
external(INT, "SetWindowText", "SetWindowTextA", "User32.dll");
external(INT, "SetWindowPos", "SetWindowPos", "User32.dll");
int t1, t2;
int static1, static2, static3;
int h_dialog;
int pause_=66; // 66 секунд
createdialog(0);
showdialog(0, "Диалог", 400, 300, 250, 120, 1, 1);
SetWindowText(static2, "Нужный текст");
SetWindowText(static3, "Ещё текст");
t1=gettime()/1000; t2=t1;
enabletimer(0);
loop()sleep(10);
function getmessage(0, WM_CREATE)
{
h_dialog = gethwnd(0);
static1=CreateWindow(0, "STATIC", "", WS_CHILD | WS_VISIBLE, 10, 10, 200, 20, gethwnd(0), 0, 0, 0);
static2=CreateWindow(0, "STATIC", "", WS_CHILD | WS_VISIBLE, 10, 35, 200, 20, gethwnd(0), 0, 0, 0);
static3=CreateWindow(0, "STATIC", "", WS_CHILD | WS_VISIBLE, 10, 60, 200, 20, gethwnd(0), 0, 0, 0);
}
function toNormalTime(int Seconds)
{
char c[1024];
int Min=Seconds/60, Sec=Seconds-Min*60;
wsprintf(address(#c[0]), "%02d:%02d", Min, Sec);
return format(#c[0]);
}
CREATE_TIMER(0, 100)
{
SetWindowPos(h_dialog, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
if(pause_>-1)
{
SetWindowText(static1, toNormalTime(pause_));
t1=gettime()/1000;
if(t1!=t2){t1=gettime()/1000; t2=t1; pause_--;}
}
}