For example demo code where is used the slider as a control object is the demo application in standard package called EGUI_D4D_Demo.
// Slider static D4D_TCHAR scrMain_sldrVol_str[] = " 0";
D4D_DECLARE_RSLIDER_AUTOSIZE(scrMain_sldrVol, scrMain_sldrVol_str, SLDR_VOL_POSX, SLDR_VOL_POSY, SLDR_VOL_SIZEX, SLDR_VOL_SIZEY, 8, (D4D_SLDR_F_DEFAULT | D4D_SLDR_F_AUTOCOLOR | D4D_SLDR_F_BAR_SCALECOLOR), NULL, NULL, FONT_BERLIN_SANS_FBDEMI12, NULL, ScrMain_OnChangeSldr, NULL)
Look for example on this object definition.
Petr