股票量化軟件:赫茲量中創(chuàng)建綁定控件的應用
//+------------------------------------------------------------------+ //| Parametric constructor ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | //+------------------------------------------------------------------+ CGCnvElement::CGCnvElement(const ENUM_GRAPH_ELEMENT_TYPE element_type, ? ? ? ? ? ? ? ? ? ? ? ? ? const int ? ? ?element_id, ? ? ? ? ? ? ? ? ? ? ? ? ? const int ? ? ?element_num, ? ? ? ? ? ? ? ? ? ? ? ? ? const long ? ? chart_id, ? ? ? ? ? ? ? ? ? ? ? ? ? const int ? ? ?wnd_num, ? ? ? ? ? ? ? ? ? ? ? ? ? const string ? name, ? ? ? ? ? ? ? ? ? ? ? ? ? const int ? ? ?x, ? ? ? ? ? ? ? ? ? ? ? ? ? const int ? ? ?y, ? ? ? ? ? ? ? ? ? ? ? ? ? const int ? ? ?w, ? ? ? ? ? ? ? ? ? ? ? ? ? const int ? ? ?h, ? ? ? ? ? ? ? ? ? ? ? ? ? const color ? ?colour, ? ? ? ? ? ? ? ? ? ? ? ? ? const uchar ? ?opacity, ? ? ? ? ? ? ? ? ? ? ? ? ? const bool ? ? movable=true, ? ? ? ? ? ? ? ? ? ? ? ? ? const bool ? ? activity=true, ? ? ? ? ? ? ? ? ? ? ? ? ? const bool ? ? redraw=false) : m_shadow(false) ?{ ? this.m_type=OBJECT_DE_TYPE_GELEMENT; ? this.m_element_base=NULL; ? this.m_chart_color_bg=(color)::ChartGetInteger((chart_id==NULL ? ::ChartID() : chart_id),CHART_COLOR_BACKGROUND); ? this.m_name=(::StringFind(name,this.m_name_prefix)<0 ? this.m_name_prefix : "")+name; ? this.m_chart_id=(chart_id==NULL || chart_id==0 ? ::ChartID() : chart_id); ? this.m_subwindow=wnd_num; ? this.m_type_element=element_type; ? this.SetFont(DEF_FONT,DEF_FONT_SIZE); ? this.m_text_anchor=0; ? this.m_text_x=0; ? this.m_text_y=0; ? this.m_color_bg=colour; ? this.m_opacity=opacity; ? this.m_shift_coord_x=0; ? this.m_shift_coord_y=0; ? if(this.Create(chart_id,wnd_num,this.m_name,x,y,w,h,colour,opacity,redraw)) ? ? {