HexEdit/GridCtrl_src/GridCtrl.cpp
BOOL CGridCtrl::Create(const RECT& rect, CWnd* pParentWnd, UINT nID, DWORD dwStyle)
{
    ASSERT(pParentWnd->GetSafeHwnd());

    if (!CWnd::Create(GRIDCTRL_CLASSNAME, NULL, dwStyle, rect, pParentWnd, nID))
        return FALSE;

    //Initialise();

    // The number of rows and columns will only be non-zero if the constructor
    // was called with non-zero initialising parameters. If this window was created
    // using a dialog template then the number of rows and columns will be 0 (which
    // means that the code below will not be needed - which is lucky 'cause it ain't
    // gonna get called in a dialog-template-type-situation.

    TRY
    {
        m_arRowHeights.SetSize(m_nRows);    // initialize row heights
        m_arColWidths.SetSize(m_nCols);     // initialize column widths
        m_col_size.resize(m_nCols, -1);     // init column size when last resized
    }
// creates the control - use like any other window create control

creates the control - use like any other window create control
creates the control - use like any other window create control
BOOL CGridCtrl::Create(const RECT& rect, CWnd* pParentWnd, UINT nID, DWORD dwStyle)
{
    ASSERT(pParentWnd->GetSafeHwnd());
    if (!CWnd::Create(GRIDCTRL_CLASSNAME, NULL, dwStyle, rect, pParentWnd, nID))
        return FALSE;
    TRY
    {
        m_arRowHeights.SetSize(m_nRows);    
        m_arColWidths.SetSize(m_nCols);     
        m_col_size.resize(m_nCols, -1);     
    }
BOOL CGridCtrl :: Create ( const RECT & rect , CWnd * pParentWnd , UINT nID , DWORD dwStyle ) { ASSERT ( pParentWnd -> GetSafeHwnd ( ) ) ; if ( ! CWnd :: Create ( GRIDCTRL_CLASSNAME , NULL , dwStyle , rect , pParentWnd , nID ) ) return FALSE ; TRY { m_arRowHeights . SetSize ( m_nRows ) ; m_arColWidths . SetSize ( m_nCols ) ; m_col_size . resize ( m_nCols , -1 ) ; }
creates the control - use like any other window create control
creates the control - use like any other window create control
//Initialise();
 // The number of rows and columns will only be non-zero if the constructor
 // was called with non-zero initialising parameters. If this window was created
 // using a dialog template then the number of rows and columns will be 0 (which
 // means that the code below will not be needed - which is lucky 'cause it ain't
 // gonna get called in a dialog-template-type-situation.
 // initialize row heights
 // initialize column widths
 // init column size when last resized
