Resizing Controls and Text content
Hello all,
I have a SDI application that uses a CFormView class to create a window and this window has 2 buttons and 2 edit boxes.
I can resize this window, like minimize and maximize, but the controls all stay at the same place.
I know that it's possible to move the controls based on window size.
But what i want to do is, as the window is expanded the controls and it's text content to grow proportionally and same when the window is shrinked.
Is that possible to do? i.e., increase/decrease size of controls and texts per window size.
Any sample code will help.
Thanks in advance.
Re: Resizing Controls and Text content
Yes, it's possible.
Handle WM_SIZE message in CFormView and resize all its child windows (you will have to enumerate them.)
The same way change their font size (GetFont, GetLogFont, change font size, create new font, SetFont)
Re: Resizing Controls and Text content