Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Native API window designer

Why isn't there a designer for native api forms in Visual Studio? Similar to Delphi? If there exist some programs, tools etc, please advice.

What is the best approach to design complex windows in pure API?


1 Answers

There's ressource editor for dialogs, and then there is code. I've never really missed some visual design tool, though some better support from the controls themselves would be nice.

The core problem is the abstraction level: using just Win32 controls, designing a complex GUI needs some forethought, and the controls all have slightly different oddities, capabilities and features. They don't have a common interface that can be used to build a designer on top.

WinForms was designed from the ground up with designer support in mind, and it shows. The main design concern of Win32 controls was memory footprint of code and data.

Even MFC (which still shows many signs of memory scarcity) doesn't abstract these oddities away well enough to warrant a decent forms designer.

All environments that come with a decent forms editor (I remember Watcom ++ / Optima, ZINC, and quite some others I've forgotten the names of) also come with a decent forms library with a high abstraction level.

Then, there's the problem of modifications. What should be the designer's output? One could shoot for an XML data file, but that would add a dependency to some large libraries to your native app - doesn't make much sense. Or you create code, but C/C++ isn't well suited to that. Another binary format? You'd limit yourself to what the designer allows.


In the end, the designer would have to take care of each control separately, and still could not isolate you from knowing the controls and window mechanisms inside out. It was never undertaken when C++ was the first choice for large scale desktop development. Adding it now, when there are - arguably - better choices, would be a rather stupid move.

like image 128
peterchen Avatar answered Jul 11 '26 14:07

peterchen