System Delphi

Title: How to use system icons
procedure TForm1.Button1Click(Sender: TObject);
var
icon: TIcon;
begin
icon := TIcon.Create;
try
icon.Handle := LoadIcon(0, IDI_HAND);
Canvas.Draw(30, 100, icon);
finally
icon.Free
end;
end;
{
possible constants:
- OBM_BTNCORNERS
- OBM_BTSIZE
- OBM_CHECK
- OBM_CHECKBOXES
- OBM_CLOSE
- OBM_COMBO
- OBM_DNARROW
- OBM_DNARROWD
- OBM_DNARROWI
- OBM_LFARROW
- OBM_LFARROWD
- OBM_LFARROWI
- OBM_MNARROW
- OBM_REDUCE
- OBM_RESTORE
- OBM_REDUCED
- OBM_SIZE
- OBM_UPARROW
- OBM_ZOOM
}
//Bitmaps
procedure TForm1.Button2Click(Sender: TObject);
var
bitmap: TBitmap;
begin
bitmap := TBitmap.Create;
try
bitmap.Handle := LoadBitmap(0, makeintresource(OBM_RESTORE));
Canvas.Draw(100, 100, bitmap);
finally
bitmap.Free
end;
end;