CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2016
    Posts
    35

    form view and controls sizing

    Hello,

    I am implementing a form view with controls but I am having problems sizing the width of the controls if the width of the MDIChildWnd frame which holds the view is changed.

    Apparently there are two borders that have to work together.

    The border of the MDIChildWnd frame and the border of the dialog box, the property of which I have set to Resizing.

    There are OnSize functions available for both.

    I was able to correctly size the controls in the form view in the OnActivateView code using MoveWindow for the controls. But that is as far as I was able to go.

    I have also tried using the same code in the Form View OnSize unsuccessfully.

    I have looked everywhere including Code Guru for sample code to do this but have been unsuccessful.

    Please help.

  2. #2
    Join Date
    Jan 2009
    Posts
    399

    Re: form view and controls sizing

    And CYourFormView::OnSize is called when you resize the CMDIChildWnd ?

  3. #3
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: form view and controls sizing

    Quote Originally Posted by robertzp View Post
    ... I am implementing a form view with controls but I am having problems sizing the width of the controls if the width of the MDIChildWnd frame which holds the view is changed.

    Apparently there are two borders that have to work together.

    The border of the MDIChildWnd frame and the border of the dialog box, the property of which I have set to Resizing....
    What dialog box do you mean / refer to?

    Quote Originally Posted by robertzp View Post
    ...
    There are OnSize functions available for both.

    I was able to correctly size the controls in the form view in the OnActivateView code using MoveWindow for the controls. But that is as far as I was able to go.

    I have also tried using the same code in the Form View OnSize unsuccessfully.
    And does your code in Form View OnSize look like?
    Victor Nijegorodov

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