CODE:#define WS_VISIBLE 268435456
#define WS_CHILD 1073741824
#define WS_BORDER 8388608
#define RUSSIAN_CHARSET 204
#define OUT_DEFAULT_PRECIS 0
#define CLEARTYPE_QUALITY 5
#define FF_DONTCARE 0
#define CLIP_DEFAULT_PRECIS 0
external(INT, "CreateWindow", "CreateWindowExA", "User32.dll" );
external(INT, "GetDC", "GetDC", "User32.dll" );
external(INT, "SelectObject", "SelectObject", "Gdi32.dll" );
external(INT, "CreateFont", "CreateFontA", "Gdi32.dll" );
external(INT, "TextOut", "TextOutA", "Gdi32.dll" );
external(INT, "SetTextColor", "SetTextColor", "Gdi32.dll" );
external(INT, "SetBkMode", "SetBkMode", "Gdi32.dll" );
external(INT, "GetFocus", "GetFocus", "User32.dll" );
external(INT, "GetWindowText", "GetWindowTextA", "User32.dll" );
int edit1, edit2, hdc1, hdc2, font1;
char c1[99], c2[99], temp[99];
strcpy(#c1[0], "Логин");
strcpy(#c2[0], "Пароль");
createdialog(0);
showdialog(0, "Диалог", 100, 100, 300, 200, 1, 1);
enabletimer(0);
loop()sleep(1);
function getmessage(0, WM_CREATE)
{
edit1=CreateWindow(0, "EDIT", "", WS_VISIBLE | WS_CHILD | WS_BORDER, 10, 10, 100, 21, gethwnd(0), 0, 0, 0);
edit2=CreateWindow(0, "EDIT", "", WS_VISIBLE | WS_CHILD | WS_BORDER, 10, 40, 100, 21, gethwnd(0), 0, 0, 0);
font1=CreateFont(18, 0, 0, 0, 300, 0, 0, 0, RUSSIAN_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, CLEARTYPE_QUALITY, FF_DONTCARE, "Arial");
hdc1=GetDC(edit1);
hdc2=GetDC(edit2);
}
function getmessage(0, WM_COMMAND)
{
if(message.lparam == edit1){update(formatiw(edit1)); return; }
if(message.lparam == edit2){update(formatiw(edit2)); return; }
}
CREATE_TIMER(0, 100)
{
if(GetFocus() != edit1)
{
if(GetWindowText(edit1, address(#temp[0]), sizearray(temp))==0)
{
SelectObject (hdc1, font1);
SetBkMode(hdc1, 0);
SetTextColor(hdc1, rgb(200, 200, 200)); // цвет подсказки
TextOut(hdc1, 5, 1, address(#c1[0]), size(format(#c1[0])));
}
}
if(GetFocus() != edit2)
{
if(GetWindowText(edit2, address(#temp[0]), sizearray(temp))==0)
{
SelectObject (hdc2, font1);
SetBkMode(hdc2, 0);
SetTextColor(hdc2, rgb(200, 200, 200));
TextOut(hdc2, 5, 1, address(#c2[0]), size(format(#c2[0])));
}
}
}