Resizing Controls in MFC

前端 未结 8 1920
萌比男神i
萌比男神i 2021-01-11 10:26

I am writing a program which has two panes (via CSplitter), however I am having problems figuring out out to resize the controls in each frame. For simplicity,

8条回答
  •  借酒劲吻你
    2021-01-11 10:44

    I use CResize class from CodeGuru to resize all controls automatically. You tell how you want each control to be resized and it does the job for you.

    The resize paradigm is to specify how much each side of a control will move when the dialog is resized.

    SetResize(IDC_EDIT1, 0,   0,   0.5, 1);
    SetResize(IDC_EDIT2, 0.5, 0,   1,   1);
    

    Very handy when you have a large number of dialog controls.

    Source code

提交回复
热议问题