How to program frames in C++ [closed] - c++

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
OK, C++ noob here asking a very nooby question (sorry) but whenever I write my basic programs (helloworld etc.) they always appear in a command prompt window. I want to make proper windows like in Word and other programs. I know it is possible to do this because of all the programs I use every day. But how do I do this in C++? For all the Java veterans out there, I want it to be like a JFrame, but the C++ equivalent.

C++ doesn't have a UI library out of the box, so you need to choose one.
Popular options would be MFC (under Windows/Visual C++) or Qt (with quite a lot additional libraries and features, working on many platforms).

Since you mention Word, it appears that you're on the Windows platform.
Then consider starting with e.g. the Lessons in Windows API Programming (C++) hands-on tutorial.
There are also a great many other tutorials on the net, and books to buy. I just picked the one that I was most familiar with, as the author. Regarding books, the classic book on programming the Windows API is Petzold's "Windows Programming", but I seem to recall that the latest version is for Windows 8 and in C# (earlier version were C/C++).
The tutorial leads you through how to get started with creating window programs using the Windows API (Application Program Interface) direcetly.
This is fairly language independent, but the language used in the tutorial is C++. C++ doesn't have standard library support for GUI stuff. The idea in C++ is that you're free to use whatever third party libraries that you want, or create them, such as the Windows API.

This is highly platform dependent. You can use a GUI cross-platform library, like QT, or use native mechanisms. Under Windows you can use the WinAPI and MFC.

Related

Is it possible to create GUI applications with c++ standard native library? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am interested in GUI application development, and when i search for it i found the only way ahead of me is to master in frameworks like qt, wxWidgets, gtk+, win32 etc. Win32 is ofcourse a native way, but it only run on win pc.
Why c++ standard native libraries does not provide APIs for GUI development?, just like like java.
It has every functions of its own to make a fully featured GUI app..?
Most platforms such as Windows, Mac OSX, Unix, Unix derivatives like Linux, and so forth, provide libraries of callable routines or objects which support GUI development on those platforms.
It might be nice to have a universal GUI library, but that would likely limit its features and aesthetics to a particular format and architecture which would necessarily have to exclude some of the most distinctive and useful features of the platform on which such applications would be used.
So one needs to select a platform for development and anticipate parallel development on alternative platforms. Sometimes aesthetics drives these decisions and sometimes capabilities and performance drives them.
Welcome to an endless adventure, good friend.
No.
GUI require graphics. C++ does not require a graphical environment. Unless you implement an OS yourself with graphics drivers etc in C++ you will not be able to do that.
And if you do, you will have re-invented the wheel (Win32).
Edit: As for java it is practically an OS.

C++ Basics to Starting a very simple GUI [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I just acquired Microsoft Visual studio 2013 for my college so you know what environment I'm using. I have never done any visual elements with c++, I have with many other easy languages such as LUA via the iPad or python, so on and so forth. Main question is, where do I start, what libraries do I use. Just some direction would be a huge help.
Thanks Guys,
Rain Terminal
Qt is a mature C++ library for cross-platform GUI development.
There is no standard way to create a GUI with C++.
Since you are on Visual Studio and Windows, you can use the methods offered by the system, functions like CreateWindow etc. There are plenty of examples online, Google it.
Visual Studio also offers the so called MFC (you have to start a new C++ project as MFC), that allow easy development of GUI by interacting directly with GUI elements (similar to Delphi IDE). But this is all for Windows only.
If you are looking for a cross-platform alternative, there is Qt as mentioned before.

C++ stylish GUI [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I am trying to show future employers that I can do something with C++ (ironically I can't because I'm here). I am trying to write a program that for starters tracks my purchases and stocks and bills and categories and possibly does graphs. I want to do something related to my life that I may actually use.
I did a little investigation: Wt, cppCMS but am still confused
I want the program to look like Apple windows (in general) as opposed to the command window (black with boxy white letters)
Any help? What should I use?
If you're ambitious, and really want it to look like Apple GUI (because it's really important), just go ahead and download Xcode, learn Mac programming from the online help at the Apple sites, and write a little app. Will take a bit of time, though. You'll have to use Objective-C and Objective-C++, though, and show that your C++ skills can be integrated with your Objective-C skills, to use the newer interfaces. Or, you could use the older "Carbon" interfaces and stay in C++.
Otherwise, I'd use some popular GUI framework, such as QT or GTK+, then you can stay in C++. You'll also have a good template app to start with.
QT has a link to an Apple look-and-feel doc:
http://qt-project.org/doc/qt-5.0/qtdoc/qtmac-as-native.html
You can use GTK+ and gain some Mac look-and-feel by linking with the GTK Quartz graphics libraries, which provide native graphics. A link to starting info is here: http://www.gtk.org/download/macos.php

worth the time investment to learn Qt (c++)? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 11 months ago.
Improve this question
i already know java, c++ (no one framework for GUI development) and little of c# (winforms for gui development) but i'm thinking to ivest my free time to learn Qt, what do you recommend me? has Qt a good future or not?
I think it's worth it. We used Qt recently because it allowed us to make a cross-platform GUI that looks good on Linux, Windows, and Mac. It's kind of a tough learning curve to figure out how to use the QLayouts correctly, but after you do your GUI will look great on many different platforms, with many different font sizes, and with many different window sizes. I like how Qt allows you to make applications that use the native widgets with the native look and feel. Applications built with Qt will look like they belong no matter what platform they are running on. Another great feature is that the Qt framework is small enough that you can just include the Qt DLL files in your application's binary directory, so it simplifies the installation process for your application and makes life easier for everyone (no VMs to install, no 600 MB downloads).
I'd recommend using Qt directly from C++. There are wrappers for it on many languages, but it's hard to believe those wrappers will support every feature and allow you to subclass Qt classes.
You can kind of make cross-platform GUIs with C# WinForms, using Mono on Linux and Mac. But Mono's WinForms is not maintained, the results look really bad, and there are some crippling bugs on macOS.
I can't say enough good things about Qt. Their documentation is bar-none. I've never seen more examples and better documentation that with Qt. It's the standard by which I judge all other frameworks. What's more, the Cross-Platform capabilities are amazing. You get native looking apps, all for free. I'd say go for it.

Cross-platform GUI toolkit in C or C++? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking to write some simple GUI applications in C or C++, and am stuck for choice between the cross-platform toolkits. Keep in mind that I am developing in Ubuntu, preferably without an IDE, and preferably with good cross-platform support.
What are the pros and cons of some of these toolkits? Which have you had the best experience with?
So far, I've looked into Qt, GTK+ and wxWidgets.
I have experience with Qt and wxWidgets. Both are OK for simple GUI applications, but Qt looks more professional. I like that it keeps GUI definition code in separate files (like in .NET WinForms designer), and it is not mixed with our own code. Qt Creator is good IDE which may be used also for developing non-Qt C/C++ applications.
In Ubuntu, both Qt and wxWidgets are available in the repository, and can be installed by standard way, without building the source.
I have a friend that is programming 3D Game Engine and he is using and recommending wxWidgets. On the other hand I have some friends developing applications for Nokia Phones, and they are using QT, and recommending it too. The answer is - choose what fits you best. ;]
since both Qt and wxWidgets have been recommended, I have only one more I know enough to recommend: Clutter. It's more of a widget toolkit, rendered in OpenGL.