To create a TempleOS graphic ctrl, you define callback functions and insert a CCtrl structure in the CTask queue. See ::/Demo/Graphics/Slider.HC, ::/Demo/Graphics/ScrollBars.HC and TermBttnNew. There is a template-code ctrl generator, if you press <CTRL-SHIFT-L>.