|
virtual |
Called to calculate cell size
This method is called by legend to calculate cell size. You have to override this method in a derived class if you wish to display a custom content in a "standard" cell. The calculated size should be stored in m_szCellSize member.
You can override OnCalcCustomCellSize to provide custom size for a cell of LCT_CUSTOM style.
If you calculate size based on any D2D resources that are also used to draw cell content, you must call Destroy for these resources (which detaches a resource from graphics manager) before using them in this override. This prevents sharing a resource between two graphics managers (CalcSize can be called outside of OnDraw context and pGM passed to CalcSize differs to the one passed to OnDraw).
pGM | a pointer to a graphics manager |