scrollable dialog - Programmer

This is a discussion on scrollable dialog - Programmer ; I've seen applications which have dialog window with control buttons/edit boxes etc. inside a scrollable frame. The number of buttons are dynamically set at runtime and you can add/delete buttons corresponding to add/delete items in this frame. Could anyone give ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: scrollable dialog

  1. scrollable dialog

    I've seen applications which have dialog window with control
    buttons/edit boxes etc. inside a scrollable frame. The number of
    buttons are dynamically set at runtime and you can add/delete buttons
    corresponding to add/delete items in this frame. Could anyone give me
    some pointers how to implement this with MFC? I did exactly this with
    Perl/Tk a while ago but have no clue how to do it with MFC.

    Thanks,

    David

  2. Re: scrollable dialog

    David Ananas wrote:
    > I've seen applications which have dialog window with control
    > buttons/edit boxes etc. inside a scrollable frame. The number of
    > buttons are dynamically set at runtime and you can add/delete buttons
    > corresponding to add/delete items in this frame. Could anyone give me
    > some pointers how to implement this with MFC? I did exactly this with
    > Perl/Tk a while ago but have no clue how to do it with MFC.
    >
    > Thanks,
    >
    > David


    Build a standard SDI doc/view application and in the last wizard step
    change the view base class to CFormView. That will give you the
    scrolling dialog look and behavior. If you know the max number of
    buttons you will need it is easiest to add them to the form and make
    them visible/invisible in code (ShowWindow). Otherwise you can create
    them by calling CButton::Create when necessary.

    Note that CFormView is derived from CScrollView, so if you need to
    resize the form when buttons are added you can call SetScrollSizes to
    make the "logical" form bigger (or smaller).

    --
    Scott McPhillips [VC++ MVP]


+ Reply to Thread