ADD: DialogAPI - progress bar support

This commit is contained in:
Alexander Koblov 2019-11-17 14:45:21 +00:00
commit e943d5ad84
3 changed files with 11 additions and 0 deletions

View file

@ -38,6 +38,7 @@
#define DM_GETITEMDATA DM_FIRST+34
#define DM_SETITEMDATA DM_FIRST+35
#define DM_LISTSET DM_FIRST+36
#define DM_SETPROGRESSVALUE DM_FIRST+37
/* events messages */
#define DN_FIRST 0x1000

View file

@ -41,6 +41,7 @@ const
DM_GETITEMDATA = DM_FIRST+34;
DM_SETITEMDATA = DM_FIRST+35;
DM_LISTSET = DM_FIRST+36;
DM_SETPROGRESSVALUE = DM_FIRST+37;
// events messages
DN_FIRST = $1000;

View file

@ -48,8 +48,10 @@ type
DialogMemo: TMemo;
DialogImage: TImage;
DialogTabSheet: TTabSheet;
DialogScrollBox: TScrollBox;
DialogRadioGroup: TRadioGroup;
DialogPageControl: TPageControl;
DialogProgressBar: TProgressBar;
DialogDividerBevel: TDividerBevel;
// Dialog events
procedure DialogBoxShow(Sender: TObject);
@ -531,6 +533,13 @@ begin
if wParam <> -1 then
Control.Visible:= Boolean(wParam);
end;
DM_SETPROGRESSVALUE:
begin
if (Control is TProgressBar) then
begin
TProgressBar(Control).Position:= wParam;
end;
end;
end;
end;