SRGraph::AddComponent
SRGraphComponent*SRGraph::AddComponent(UINTnType, intnMeasure, const CRect&rect, DWORDnBorder, DWORDnShadow, DWORDnFillStyle, DWORDnGraphStyle, DWORDnAxisStyle)
This is a convinent version of the original AddComponent routine. You are only required to give the component type to add a component to the graph. This function gives a reasonable default for all other arguments. This function return a pointer to the component this function created so that you can do further setup with this returned pointer. If the specified type is IDS_SRG_COMPOUNDDISPLAYTYPE, then this function will automatically create a SRGraphDisplay component as the YGraphDisplayA of the SRGCompoundDisplay component and the graph style and axis style argument will apply to this embeded SRGraphDisplay component. The other argument will still only apply to the compound display component.
Defined in: SRGraph.cpp
Return Value
Pointer to the added component
Parameters
nType
The type of compounent you want to add to the graph. Valid value includes:
IDS_SRG_BACKGROUNDTYPE, SRGraphBackground component
IDS_SRG_TITLETYPE, SRGraphTitle component
IDS_SRG_DISPLAYTYPE, SRGraphDisplay component
IDS_SRG_LABELTYPE, SRGraphLabel component
IDS_SRG_LABELBLOCKTYPE, SRGraphLabelBlock component
IDS_SRG_LEGENDTYPE, SRGraphLegend component
IDS_SRG_TEXTPANELTYPE, SRGTextPanel component
IDS_SRG_COMPOUNDDISPLAYTYPE, SRGCompoundDisplay component
nMeasure
Measurement for this component
rect
const Component rectangle
nBorder
This component border style
nShadow
This component shadow style
nFillStyle
This component fill style
nGraphStyle
Only used when nType is IDS_SRG_DISPLAYTYPE or IDS_SRG_COMPOUNDDIPLAYTYPE It sets the graph style for this display. If nType is IDS_SRG_COMPOUNDISPLAYTYPE, the it set the graph style of the YGraphDisplayA display.
nAxisStyle
Only used when nType is IDS_SRG_DISPLAYTYPE or IDS_SRG_COMPOUNDDISPLAYTYPE It sets the axis style for this display. If nType is IDS_SRG_COMPOUNDISPLAYTYPE, the it set the axis style of the YGraphDisplayA display.