void OnInit() {
string obj_name = "testobj";
int chart_id = 0;
ObjectsDeleteAll();
ObjectCreate(chart_id,obj_name,
OBJ_BITMAP_LABEL,
0,
0,
0
);
ObjectSetInteger(chart_id,obj_name,OBJPROP_BACK,false);
ObjectSetInteger(chart_id,obj_name,OBJPROP_SELECTABLE,false);
ObjectSetInteger(chart_id,obj_name,OBJPROP_SELECTED,false);
ObjectSetInteger(chart_id,obj_name,OBJPROP_HIDDEN,true);
ObjectSetInteger(chart_id,obj_name,OBJPROP_ZORDER,0);
ObjectSetString(chart_id,obj_name,OBJPROP_BMPFILE,0,"\\Include\\Controls\\res\\CloseDisable.bmp");
ObjectSetString(chart_id,obj_name,OBJPROP_BMPFILE,1,"\\Include\\Controls\\res\\CloseOn.bmp");
ObjectSetInteger(chart_id,obj_name,OBJPROP_CORNER,CORNER_RIGHT_LOWER);
ObjectSetInteger(chart_id,obj_name,OBJPROP_XDISTANCE,100);
ObjectSetInteger(chart_id,obj_name,OBJPROP_YDISTANCE,40);
ObjectSetInteger(chart_id,obj_name,OBJPROP_ANCHOR,ANCHOR_LEFT_LOWER);
ObjectSetInteger(chart_id,obj_name,OBJPROP_XOFFSET,0);
ObjectSetInteger(chart_id,obj_name,OBJPROP_YOFFSET,0);
ObjectSetInteger(chart_id,obj_name,OBJPROP_XSIZE,0);
ObjectSetInteger(chart_id,obj_name,OBJPROP_YSIZE,0);
}