void SRGraphRect::CRectToSRGRect(CRect & rect, CDC * pDC)
Calculates a SRGraphRect from a screen CRect given the measurement mode stored in m_nType -- primarily used to recalculate sizes of components with an auto size feature such as SRGraphLegend
Defined in: SRGraphRect.cpp
Parameters
rect
Reference to the CRect to be converted
pDC
Pointer to a device context
/* CDC->GetDeviceCaps reports 120 pixels per inch for X and Y */ SRGraphRect A,B,ResultA,ResultB; CRect r(100,100,200,200); A.SetMeasurement(0); B.SetMeasurement(1); ResultA=A.CRectToSRGRect(r); ResultB=B.CRectToSRGRect(r); results... ResultA.. left=100 top=100 right=200 bottom=200 ResultB.. left=21.16666666667 top=21.16666666667 right=42.33333333333 bottom=42.33333333333