Build GUI for Windows without using Windows API

5

I have searched the internet for a way to build graphical interfaces for windows without necessarily using the Windows API.

I program in C # and for that, I have the WPF solution. However, I could not find any solution in C ++.

My goal is to create a GUI such as the Popcorn, Ccleaner, and other softwares. In them, you can see that the interface was not made (at least it is what I think) in windows form and nor based on the windows of other systems, as it could be a program for linux or MacOS X, which brings a notion of design sophisticated and different.

I do not know if it was to be very clear, but the point is that there are programs with "standard" interfaces, they are those that have an interface similar to the graphic elements of the operating system itself (windows, buttons, text box, etc. ) And there are programs that have their own interface style. I wanted a C ++ solution that would give me a direction for this.

    
asked by anonymous 24.03.2015 / 04:02

1 answer

6

If these softwares were not made with .Net, and as far as I know they were not, they do not actually use Windows Forms, which is nothing more than a layer on top of the Windows API.

When you want to manipulate windows in the operating system does not have much like escaping the windows API it. To what extent will you use all the features or just the main ones and do the rest at hand is a decision of yours or the library you want to use.

Most programmers prefer to use libraries that make it easier to use the operating system API.

In fact if your intention is to make an application that runs on more than one platform there are two alternatives: create a code to manipulate the screens in each platform or use a library that can abstract a good part of them.

If you are going to create a GUI system for each platform a few options would be MFC for Windows , GTK for Linux or Cocoa for MacOS.

There are other options mostly for Windows but everyone complains that none is good enough. And they work just fine, but they're often hard to handle libraries.

You can use GTK on other platforms but the result is not good. A binding is required since this library was written in C.

You can not use Cocoa directly in C ++. It's almost impractical.

If the option is to create a single system for all of them the best options seem to be WxWidgets and Qt .

The first one uses a lot of the native resources but it is not so simple to work with it and the result is not always adequate. The look works great but the experience leaves something to be desired. I've seen some reports of bugs that are never solved.

The second one does not always get perfect visual result but it is simpler to make everything work on all platforms. It even allows you to make applications for the 3 major mobile device platforms. Of course, taking advantage of desktop screens on mobile is not something that usually works. It is considered native to Linux and the Windows look is very well reproduced, if you mess up as much as or more than WPF that is not perfect either.

In almost all of them it is possible to make a custom look that fades from the operating system default. But the problem is if you change the behavior, the overall experience. No matter how good the usability in one platform, when it is applied in another, it does not usually work very well.

Even if you want to use Windows only as the title of the question proves, you'll probably prefer a higher-level library, such as Qt. Because of its flexibility, it seems to be as close to what you want. But do not believe my word, search more.

Qt lets you make the application look just the way you want it to. It allows your entire drawing to be customized.

Choose MFC, ATL or WTL . which are official or almost official Microsoft options is not easy. Some find that the pure Win32 API is even easier:)

There are other options but few people use: eGUI , Ultimate ++ , SmartWin .

There is also the Builder VCL library, but it only works with Embarcadero compilers.

The list does not end here. The amount of options is impressive.

This is the basis for you to research further and see what meets your need. But I already notice that none is perfect.

    
24.03.2015 / 04:24