CDialogEx with a scrollable canvas/panel/formview
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: CDialogEx with a scrollable canvas/panel/formview

  1. #1
    Join Date
    Dec 2011
    Posts
    44

    CDialogEx with a scrollable canvas/panel/formview

    Hello,

    I have a CDialogEx in my dll which is displayed correctly. This CDialogEx does have a group box. Now I need to display a dynamic amount of edit boxes and labels in a panel/canvas or whatever within this groupbox. The size of this canvas can be larger than the groupbox, so I would need a vertical scroll bar. How can I do this in MFC? I know in C# this is pretty straight forward...but I can't find any controls which would help me out in C++ MFC.

    My first thought was creating a IDD_FORMVIEW derived from CDialogEx, create and load it within my Dialog with the size of the group box rect...but then I have no scrolling functionality. The second guess was to use a CFormView derived class, but that I can not instantiate and load in my dialog...so I stuck now :-(

  2. #2
    Join Date
    May 1999
    Location
    DELAWARE, USA
    Posts
    9,915

    Re: CDialogEx with a scrollable canvas/panel/formview

    You may find this post helpful. See attachement.

    However this is fairly old project created using VS 6.0.

    You will have to make sure that child view has following styles set:
    Extended WS_EX_CONTROLPARENT. This will prevent dialog from looping endlessly trying to find last control and will render dialog unresposive to user input.
    DS_CONTROL See MSDN
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center