-
September 11th, 2013, 07:03 PM
#1
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.
-
September 12th, 2013, 01:40 AM
#2
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)
Victor Nijegorodov
-
September 12th, 2013, 06:54 AM
#3
Re: Resizing Controls and Text content
Cheers, D Drmmr
Please put [code][/code] tags around your code to preserve indentation and make it more readable.
As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|