CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Location
    UK (South)
    Posts
    93

    Resizing controls OnSize().



    I was just reading through the discussion board on information about MSFlexGrid, and found by accident a rather long

    winded aproach to resizing a control within the parent window.

    void CMlsfileView::OnSize(UINT nType, int cx, int cy)

    {

    CFormView::OnSize(nType, cx, cy);

    // OnSize gets called before the controls have been

    // created when using Dialog based applications.

    // Using a flag prevents exceptions.

    if (Grids_Created) // flag set to TRUE in OnInitial Update

    {

    m_Grid.MoveWindow(10,10,cx-20,cy-10);

    // m_grid is MSFlexGrid member of the view.

    }

    }

  2. #2
    Join Date
    Mar 1999
    Posts
    6

    Re: Resizing controls OnSize().



    Another way to check whether the control is created.


    m_Grid.GetSafeHwnd() != NULL



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured