Coming from Java, I expected to find some other GUI layout in Visual C++ than setting the pixel coordinates. I neither found anything in Visual Studio (2005) nor a hint on the internet that they exist (sth. like border layout, box layout, linear layout, …).
So is there anything or do I really have to do it manually with length variables?
Coming from Java, I expected to find some other GUI layout in Visual C++
Share
All GUI layouts set the pixel coordinates, based on some formula.
I’m not aware of any layout engine bundled with Visual C++, but you certainly can loop through all child windows and position them according to a formula of your choice.
One thing to consider, though, is that layout engines often query controls for “preferred size”, which native Windows controls don’t have any standard way of reporting. (There is
WM_GETMINMAXINFO, but that’s not quite the same.) So while automatically spacing elements of predetermined size is fairly easy, automatically adjusting the size in a sensible way is quite a bit more difficult.