How to use C as a GUI for windows?

Updated on delicacies 2024-05-24
4 answers
  1. Anonymous users2024-02-11

    Use GTK or QT

    Search for yourself, there is a lot of information.

  2. Anonymous users2024-02-10

    In fact, you can use Qt, which is arguably the most commonly used C++ to write GUIs.

    In fact, if you want to implement GUI, as long as it can solve the Windows problem, it can basically be a smaller, more practical program, and you don't need to go to the most lofty pursuit.

    For example, the graphics system, because it is a GUI library, cannot be drawn on HDC with GDI functions, so it can be updated to the window with Update Layered Window, so that there can be that kind of translucent shaped window graphic effect.

    In fact, I personally think that it is still very troublesome to write, with the words of a third party, there is no small 2D graphics library, then the light graphics library will break through the limit of 500kb.

    So in fact, there are many ways, and it is not so difficult, it mainly depends on what your own needs are, like thisYou can adjust your operating methods according to your own needs

  3. Anonymous users2024-02-09

    For the average person, don't expect to be able to make a large GUI library, write a smaller GUI library that meets your needs and is good for some kind of application.

    I once came across a requirement that required a small GUI library to write an installer.

    1。It can't be DLL, it must be a static link, and the less dependent it is on the system.

    2。Executable** must be small enough, generally preferably around 500kbp.

    Three. There are good graphic effects, such as through the animation of the installation process, the window should have a translucent shadow ring.

    Obviously, it is not appropriate to write in qt. Although I know many times that the qt library is not very large, it is still a small big writing and installer, and the static link exe of qt is 2mb.

    MFC is not suitable, MFC is statically linked to about 400kb, and the installer itself** and resources will inevitably break through the host.

    Much smaller written in VC++ 6 MFC, but it doesn't suit my taste.

    With WTL, this has to be very small, the static link of the program only creates a window of only about 35kb, but it has no functionality, it can only be created using the standard good faith foundation, transparent window, he and other APIs.

    Or write one, which is a bit practical, it is used to do the installer, not to pursue high capabilities.

    Cross-platform does not pursue, only solves Windows problems.

    1。Window management system, **api package, but this job is boring, very troublesome, I just realized that my own window class wtl, wtl cwindow aggregate, use wtl to help me create window management, external not to see wtl, because I don't use the derived don't want my wtl to pollute the interface design.

    2。Event system, WTL message mapping is so ugly, I love QT signals and slots, but QT like signal slots are not easy to implement, a C++ extension syntax is equivalent, and implementing a MOC preprocessing by yourself is too much work. Use boost:

    The signal is also too cumbersome. boost will introduce a large dependency library. I also want the GUI library to be compiled with the default vc++, I don't want to rely on too many libraries, the boost function will bring compilation difficulties.

  4. Anonymous users2024-02-08

    The GUI library can be small, the large one can be millions of lines of qt WPF, the small one can be WTL, and only a few header files.

    For the average person, don't expect to create a large GUI library, write a smaller library, meet your own needs, and apply it to some kind of application.

    The installation process is special. For software installed on the Internet, meet the following requirements:

    No dll can be brought. Static links must be used, and the dependencies of the system will be better.

    Executable** must be small enough, typically up to 500kb.

    There are better graphical effects, such as ultra-run animations of the installation process, the window should have a translucent shadow circle or something.

    It's not appropriate to write in qt, and while I've said many times that the qt library isn't great, it's a bit big for an installer, and the static link to qt is about 2mb.

    MFC is not suitable, the MFC static link is about 400kb, and the installer's own ** and resources must be more than 500kb.

    Written in VC++ MFC, it could be much smaller, but using this antique is not in line with my taste.

    Written in WTL, this is of course very small, only create a program static link window is only about 50kb, but I don't know what the function, can only be created with a standard shard, a transparent window wants to use other APIs by itself.

    Let me write a little, a little more practical, just for the sake of installing the program, not for the high power.

    Cross-platform is not pursued, it just solves the problem of Windows.

    There are several basic subsystems for implementing a GUI library:

    Window management system, **encapsulating windows api, but this job is boring, and very troublesome, I just use WTL implementation, my own window class cwindow aggregate WTL, WTL side to help me create window management and foreign WTL is invisible, I don't use derivation, because I don't want WTL to pollute the interface design.

    Therefore, it is recommended to use QT for the development of large projects.

Related questions
11 answers2024-05-24

Check, folder or file, right-click, select Properties, tick Hide, refresh, if, you are in the folder options, it is the default, the hidden file or folder, will be hidden because of the refresh, if the folder is selected, show all files, then that file and folder, will be looming. >>>More

10 answers2024-05-24

This is a comprehensive application of Photoshop. Have a photoshop foundation. If you're a newbie, watch the tutorial.

17 answers2024-05-24

#include

#include >>>More

12 answers2024-05-24

A must-do for bread beginners: butter rolls.

If you're still wondering what bread would be better for bread beginners and have a low failure rate, this butter roll might be your best bet! >>>More

8 answers2024-05-24

It is impossible for the cake to be made in the oven

Vegetable pots are absolutely impossible >>>More