CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2005
    Location
    India
    Posts
    47

    Question How to impliment scrollbar for Child Dialog in maindialog?

    I have one main dialog. In that I have to show another child dialog. The child dialog's height is more than parent dialog. I have to impliment scrollbar. How to impliment. Seniors, any help. Thanks.

  2. #2
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917

    Re: How to impliment scrollbar for Child Dialog in maindialog?

    You can do it hard way (if you want to learn how to handle scroll bats) or my MEMC way. Use form view as a child dialog and that is all you have to do.
    See sample.
    Attached Files Attached Files
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

  3. #3
    Join Date
    Sep 2005
    Location
    India
    Posts
    47

    Thumbs up Re: How to impliment scrollbar for Child Dialog in maindialog?

    Ohhhh......

    I am very thank ful to you. Right now my child dialog is derived from my own dialog class named C3RUDialog. So now I will try with both views like I will derive my new class from CFormView as wall as C3RUDialog. Thank you for instant reply. It helps me a lot.

  4. #4
    Join Date
    Sep 2005
    Location
    India
    Posts
    47

    Thumbs up Re: How to impliment scrollbar for Child Dialog in maindialog?

    Quote Originally Posted by JohnCz
    You can do it hard way (if you want to learn how to handle scroll bats) or my MEMC way. Use form view as a child dialog and that is all you have to do.
    See sample.
    Thank you for instant reply. Nice talking to you.

  5. #5
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917

    Re: How to impliment scrollbar for Child Dialog in maindialog?

    You are welcome.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

  6. #6
    Join Date
    Mar 2007
    Posts
    1

    Re: How to impliment scrollbar for Child Dialog in maindialog?

    You made my day even 20 years later

    The project cannot be opened in a newer Visual Studio (2022).
    But the main thing how to create the CFormView as sub dialog is still the same. (Adding a Create method and using CRuntimeClass and CreateObject()...)

    In my case it was also neccessary to set the dialog resource to set visible to false in the dialog properties. Otherwise the create failed and I got an assert in _AfxCheckDialogTemplate().

    Thank you very much for sharing!

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