VitiaCat писал(а):
Вот как сделать такой прогресс бар?! Схема
Add(MainForm,2953706,189,140)
{
link(onCreate,4103976:doInitMARQUEE,[])
}
Add(ProgressBar,15560669,266,91)
{
Left=35
Top=25
Width=330
Height=40
ProgressColor=15780518
Point(Handle)
}
Add(StyleXP,7201581,189,98)
{
}
Add(InlineCode,4103976,273,154)
{
WorkPoints=#13:doInitMARQUEE|14:doStartMARQUEE|13:doStopMARQUEE|
DataPoints=#7:wHandle|5:Speed|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|38:uses kol,Share,Debug,Windows,Messages;|0:|5:const|29:PBS_MARQUEE = $08;|36:PBM_SETMARQUEE = WM_USER+10;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|15: wnd: Integer;|17: spd: Integer; |9: public|23: wHandle:THI_Event;|21: Speed:THI_Event;|59: procedure doInitMARQUEE(var _Data:TData; Index:word); |59: procedure doStartMARQUEE(var _Data:TData; Index:word);|63: procedure doStopMARQUEE(var _Data:TData; Index:word); |5: end;|0:|14:implementation|0:|36:procedure THiAsmClass.doInitMARQUEE;|5:begin|34: wnd := ToIntegerEvent(wHandle);|83: SetWindowLong (wnd, GWL_STYLE, (GetWindowLong (wnd, GWL_STYLE) or PBS_MARQUEE));|6:end; |0:|37:procedure THiAsmClass.doStartMARQUEE;|5:begin|35: spd := ToIntegerEvent(Speed); |44: SendMessage(wnd, PBM_SETMARQUEE, 1, spd);|4:end;|0:|36:procedure THiAsmClass.doStopMARQUEE;|5:begin|42: SendMessage(wnd, PBM_SETMARQUEE, 0, 0);|4:end;|0:|4:end.|
link(wHandle,15560669:Handle,[])
link(Speed,5918988:Text,[(286,131)(321,131)])
}
Add(VisualStrings,5918988,315,105)
{
Lines=#2:25|
}
Add(Button,13615320,189,182)
{
Left=145
Top=95
TabOrder=-1
Caption="Start"
link(onClick,4103976:doStartMARQUEE,[(235,188)(235,167)])
}
Add(Button,12616507,189,217)
{
Left=205
Top=95
TabOrder=-1
Caption="Stop"
link(onClick,4103976:doStopMARQUEE,[(242,223)(242,174)])
}