B
B
belunix2012-08-20 21:25:28
C++ / C#
belunix, 2012-08-20 21:25:28

Scaling child elements of a Windows window?

How to make that when the window is resized, its child elements (buttons, windows, etc.) would change proportionally. Most likely, this is some property of the main application window itself, but what is it? Couldn't find an answer on google. On MSDN too.
Source code:
pastebin.com/1ZujQKrA
Before scaling:
png1c.png
After scaling:
png2r.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maximus5, 2012-08-21
@Maximus5

C++ is not Delphi, there will be no freebies. You need to handle the WM_SIZE message yourself in MainWndProc . With the parameters, everything is simple (link) and then - with handles.

C
Colobock, 2012-08-20
@Colobock

Offhand, it only comes to mind to handle OnResize.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question