• C++ - Interface? Clickable buttons?
    6 replies, posted
Okay, so you know generic applications, .exe files, what not. Interface, clickable buttons, all that. If I were coding a C++ application, in a .cpp file, how would I go about creating some sort of interface and clickable buttons? I've always wanted to make more than printing text with std::cout in the simple windows console.
You have multiple options, you can either use raw Win32 (not recommended), MFC (only recommended for incredibly simple applications) and QT. Visual Studio has a bad resource editor that allows creation of dialogs that you can use for Win32/MFC. Alternative to MFC is WTL which apparently Chrome and Spotify use but still not recommended unless you have a special use case. QT has a really good dialog editor but handling events in QT with the Visual Studio plugin is a pain since you have to manually find and connect events. If all you want is a button then I'd say to use MFC since Visual Studio has default support for it and all events can be auto generated for you. But more than that, use QT.
[QUOTE=CRASHFORT;48191155]You have multiple options, you can either use raw Win32 (not recommended), MFC (only recommended for incredibly simple applications) and QT. Visual Studio has a bad resource editor that allows creation of dialogs that you can use for Win32/MFC. Alternative to MFC is WTL which apparently Chrome and Spotify use but still not recommended unless you have a special use case. QT has a really good dialog editor but handling events in QT with the Visual Studio plugin is a pain since you have to manually find and connect events. If all you want is a button then I'd say to use MFC since Visual Studio has default support for it and all events can be auto generated for you. But more than that, use QT.[/QUOTE] Is there a link as to where I could download/find out how to use QT?
[QUOTE=MegaTronJohn;48191182]Is there a link as to where I could download/find out how to use QT?[/QUOTE] [url]https://www.qt.io/download/[/url] [url]http://doc.qt.io/qt-5/tutorials-addressbook.html[/url] (most of the reference available in Qt Creator IDE) You kinda remind me of myself, I started with C++ too and then I needed to move on GUI, it happened to be Qt. While I love Qt, sometimes I need to deploy Windows applications and it would be much simplier with .NET (instead of MFC, wtf is it still being used unless legacy?), because everyone have it. You may try to move on from C++ to C# .NET. It won't make you much difference based on what you want to achieve right now.
[QUOTE=suXin;48192074][url]https://www.qt.io/download/[/url] [url]http://doc.qt.io/qt-5/tutorials-addressbook.html[/url] (most of the reference available in Qt Creator IDE) You kinda remind me of myself, I started with C++ too and then I needed to move on GUI, it happened to be Qt. While I love Qt, sometimes I need to deploy Windows applications and it would be much simplier with .NET (instead of MFC, wtf is it still being used unless legacy?), because everyone have it. You may try to move on from C++ to C# .NET. It won't make you much difference based on what you want to achieve right now.[/QUOTE] Agreed Qt is a solid framework for GUI apps, but it would be wise to look into C#. its C like syntax and if you understand the basics of C++ and OOP then C# should be easy to pick up. Every language has pros and cons and depending on what you plan to do in the future one may be better then the other.
For desktop GUI applications C# is really good. If you must you can even code some stuff in C++ and then call it from C#
I can vouch for QT, I've been using it for a couple of years now, and I'm quite a fan of its event and GUI systems. If you have any previous experience with UI builders like with Java, then this is kind of similar.
Sorry, you need to Log In to post a reply to this thread.