Menu

#91 Support MFC Dynamic Dialog Layout

closed-fixed
None
5
2019-04-29
2015-05-15
ryouj888
No

Support MFC Dynamic Dialog Layout
http://blogs.msdn.com/b/vcblog/archive/2015/04/29/mfc-dynamic-dialog-layout.aspx

Motivation:
Can set layout properties on VS's dialog editor

I attached proposal code.

1 Attachments

Discussion

  • Nenad Stefanovic

    • assigned_to: Nenad Stefanovic
     
  • Nenad Stefanovic

    Thanks for submitting this, we will consider it for the future.

    Note that already existing WTL class, CDialogResize, does exactly the same thing.

     
  • Nenad Stefanovic

     
  • Anonymous

    Anonymous - 2015-12-11

    I have used CDialogResize for many years and have been happy with it – despite its limitations. I have also been playing with the CDynamicDialogLayout and it has its advantages:
    - it’s simpler, all done from within resource editor
    - easier to keep in sync, all in one place.
    -handles multilanguage (MUI) resources better.
    -no need to assigning ID’s to static controls, no IDC_STATIC1, IDC_STATIC2…
    I think the ultimate solution is to incorporate CDynamicDialogLayout functionality into CDialogResize and have to initiation functions do differentiate initiations:
    DlgResize_Init(); // using BEGIN_DLGRESIZE_MAP
    DlgResize_InitAfxLayout(); // use AFX_DIALOG_LAYOUT
    A dialog must call only one of them.
    Then _AtlDlgResizeData and CDynamicLayoutData must joined somehow.
    I have included a test application for comparison. Note the bug in CDialogResize. I had to modify the atlddl.h to make it work. It’s also included.

     
  • ryouj888

    ryouj888 - 2015-12-24

    Support VS2015.1

     
  • Nenad Stefanovic

    • status: open --> closed-fixed
     
  • Nenad Stefanovic

    Added as CDynamicDialogLayout in atlframe.h. Slightly modified to fit the coding style.

    It could be merged with CDialogResize, but that would be confusing, since internally they do different things.

    Commit: https://sourceforge.net/p/wtl/git/ci/663767a021488ed86a38bbade8a59127deacc7d6/

     

Anonymous
Anonymous

Add attachments
Cancel