Writing C++ GUI Code without Visual Studio [duplicate] - c++

This question already has answers here:
How do I build a graphical user interface in C++? [closed]
(8 answers)
Closed 1 year ago.
I don’t have Visual Studio for C++ GUI(Because I don’t want to install such a big thing on my pc).
And I don’t have any problem with working with some really simple code editor like Sublime Text or Code Blocks IDE for console C++(of course). But the problem arises when I wanna make GUIs or Graphical User Interfaces.
I couldn’t find any resource¹ anywhere for how to handcode² GUI without any GUI Designer like Visual Studio’s or Code Blocks’.
resource: Any website, video etc.
handcode: By this, I mean coding a GUI without any GUI Designer.
Found the Solution
I found that I can use the graphic designer included in SharpDevelop IDE, which I can use for making the GUI, but for the intellisense, I can use VSCode with the C/C++ extension.
SharpDevelop is primarily made for .Net, so I can use it for .Net GUI also.

You can use Linux and g++ command for compiling cpp files.
You can choose any editor programs like notepad++ or notepad.
This question is already answered How do I build GUI with c++

Related

Can't get QT to work in Visual Studio 2019 and what is the best place to learn QT?

So I do know C++ fairly well, I have used it and C for the past year in college. I'm trying to make an application with a GUI that needs a simple input box and easily customizable windows. The main focus of the project however is a lot of backend processing, I just need a GUI for the user. Is there a place where I can just learn the quick basics of QT? Also for some reason I can't get QT to work on Visual Studio 2019.
I get this error:
When I go to input the version, it doesn't actually save when I click OK.
In Manutention Tool you should download these Qt components marked as MSVC or UWP:
A MinGW build of Qt will probably work only with CLion and Qt Creator
And don't download the latest Qt, because VS doesn't work well with them.

Can I use an IDE other than Visual Studio to develop a Windows GPIO Driver? [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
My company is interested in developing a GPIO Driver for Windows to use with proprietary peripherals and would like to save money by using an IDE other than Visual Studio.
After researching on Google, the MSDN, and StackOverflow, I was unable to determine if I am able to develop a Windows GPIO Driver using an IDE other than Visual Studio. The MSDN only gives tips on how to develop a Windows GPIO driver using Visual Studio and the StackOverflow questions pertain to specific development issues, while Google gave me a combination of the two. None of the methods gave me any kind of concrete or even ballpark answer, so I decided to post my first StackOverflow question.
If it is useful, I am using Windows 10 but I have access to, and can develop on, a Windows 7 system as well.
So the first question would be: Can I use an IDE other than Visual Studio to develop a Windows GPIO Driver and if so, what would I need from VS to do so?
Can I use an (open source/free) IDE other than Visual Studio, considering I am developing on Windows?
If I have to use Visual Studio, what is the reason that another IDE would not work (i.e. missing tools, missing libraries, poor Microsoft design decision, etc)?
So the first question would be: Can I use an IDE other than Visual Studio to develop a Windows GPIO Driver and if so, what would I need from VS to do so?
Yes, you can.
There's no officially recommended or best IDE to choose. Just get one that fit's your comforts regarding
syntax highlighting
debugging support
toolchain support
intellisense support when typing code
etc. frills and gadgets ...
The question merely is, if you are required to use the MSVC compiler to develop any artifacts (executables, shared libraries) for a windows target.
And the answer fortunately is: No.
There are alternative free toolchains like MinGw GCC or Clang available, and you can use any IDE that supports to choose support for that toolchain.
You can even use a simple text editor like Notepad++.
Can I use an (open source/free) IDE other than Visual Studio, considering I am developing on Windows?
You can do anything you need using the free tools available.
But take care about correct licensing (regarding standard library implementations etc.), supposed you're developing commercial product.
Yes, you can use any toolchain you want to develop drivers for Windows. You can use any editor and compiler.
You need to focus on the requirements of a Windows driver. Microsoft is always going to recommend you use their products. For example, they may suggest using C# with Visual Studio. Microsoft may make driver development easier by using their tools (more money for them).
The final "executable" driver leaves no clues as to the language or toolchain used to create it.
The are other resources available for information about Windows Drivers than MSDN.

How can I use eclipse to build a GUI in C ? (I want to use only C and not JAVA) [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I have been using visual studio in the past
now i have started with eclipse
it is a good IDE
My question is:
I want to know is there anything similar to WindowBuilder for eclipse but for C++ specific
I want a widget toolkit that has drag and drop functionality that can be used inside eclipse for building GUI for my desktop apps
i want option both for GTK+, X and QT (QT is strange to me, I love GTK though)
Please also tell me if i can compile my GUI for Windows and linux both
I have already installed MinGW for that
I want something that works in the visual studio fashion but with eclipse as this is a cross-platform GUI
I want something that has drag and drop functionality for widgets in the perspective itself!!
also tell me (if such product exists) if i can compile that same program/GUI for other OS'es as well
like for Mac, Windows and Linux/UNIX
and do i have to pre-install the GTK on the target environment?
You need Glade. Its a GUI builder for GTK. It is a standalone app. You do not really need to have it integrated with eclipse, since it generates an xml file, and the only thing you need to is load the file. Personally I use Glade 2, an earlier version that generates C source, and standard make files which should be compatible with eclipse.
You don't need Eclipse to develop a GTK application. You'll better use a good editor (emacs or gedit) to edit your source file.
You could also consider using geany.
If your GTK application is small and in one single source file foogtk.c, you can compile it (on the terminal) with one single command, e.g.
gcc -Wall -g foogtk.c $(pkg-config --cflags --libs gtk+-3.0) -o foogtk
If your application is made of several source files, use a builder like GNU make
See also this and that answers.
Mixing GTK and Qt in the same application is not reasonable. Choose either GTK (with C) or Qt (with C++).
You may want to use GTKmm as a C++ wrapper to GTK if you really want to code GTK applications in C++
PS. If the question is a tool to design interactively your GUI, consider glade for GTK and Qt Creator & Qt Designer for Qt.

Cannot understand relationship between normal c++ vs vc++, win32 programming, mfc, win32 api, CLI [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
What is the mfc, cli and win32? Can you please help me understand how visual studio works in relationship with these 2?
what is the diff between c++ and vc++? When we say "vc++" does it imply the dialog boxes, forms, windows and other gui elements by default?
If i create a console based application in visual c++, without using any win32 programming, does it qualify as a visual application?
Do the boxes, dialog boxes, forms and other gui, come under win32 programming or are they different?
What other kinds of programming are there in c++ other than console based and win32 programming?
Please make it as simple as possible.
C++ is a programming language. It's compiled, which means you need a compiler to translate the source code into an executable program.
VC++ is a compiler from Microsoft which runs on MS Windows, and compiles C++ code into executable programs for MS Windows operating system.
There are various kinds of programs that you can write in C++, ranging from device drivers to webbrowser plugins. Well, you could even write your own operating system if you fancy that.
To ease your development, compiler developers (and third parties) have written various kinds of useful libraries. MFC is an example of a library (a framework to be more precise), which helps you in development of "visual applications" on MS Windows. There are other alternatives to MFC in the market.
Now coming to your questions:
MFC is Microsoft's framework for creating visual applications in Visual C++. CLI is command line interface. CLI applications typically don't have any visual element except for the command line input---they mostly don't have any menus and mouse interaction, either. Win32 is a generic term for 32 bit MS Windows application. You could also develop for 64 bit Windows.
C++ is a language. VC++ is a compiler. This compiler comes with some additional features, beyond what's available in C++ to ease MS Windows development, specially via MFC.
There is no standard term as a "visual application" but loosely speaking, without graphical elements your application won't be considered a visual application.
Dialog boxes, forms and other GUI elements do come under Win32 programming. You could make use of MFC to ease your development of such Win32 applications, as hinted earlier.
Beyond console based and Win32 Programming: I think you are getting confused because of the various "wizards" that come with Visual Studio when you create a new C++ project in the IDE. There could be several types of wizard configured in your installation; just to give you a few examples: you could also have ActiveX and MFC controls as the "type of application" you want to create.
Ok, lets start with Windows. Windows is built using C/C++. You can write a Windows program using the functions Windows offers you - this is Win32.
MFC = Microsoft Foundation Classes - a C++ class library that wraps around the Win32-Interface. It is a pretty thin wrapper, that means you still can (and sometimes have to) access the Win32-function. The buttons, dialog boxes, etc. are original controls from Windows.
A console application is designed to run in the command line (a.k.a. dos box). You can use parts of Windows like processes, file system, etc., but no "optical stuff" like dialogs.
VC++ is a term often used for C++ with MFC, or at least C++ under Windows.
HTH a little bit.

What is the best way to make a simple cross platform GUI in C++? [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 3 years ago.
Improve this question
I want to produce a desktop application with a very simple GUI (a background graphic, a cancel button and a progress bar).
My main targets are Mac and Windows.
Is this possible using Visual C++ 2008?
Can anyone point to any examples using Visual C++?
Or is there a better way to create the GUI separately?
Use Qt4. http://qt-project.org/
This is a self containing framework which contains developers tools, GUI builders, String/IO/XML/Thread classes, Audio/Video controls, HTML widgets and many, many more features. It's built to be completely multi-platform, one code for all systems.
In contrary to wxWidgets, it feels more object-oriented, and has by far better documentation and its better maintained.
See it online: http://qt-project.org/doc/qt-4.8/
EDIT-
6 years since the original Answer. I should point to Qt5 - http://www.qt.io/
I would recommend wxWidgets. It's crossplatform and works with Visual C++.
There's also Qt (see Colins post) which is what KDE (Linux desktop manager) uses. It has a more restrictive license though.
You can also have a look at FLTK
FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for UNIX®/Linux® (X11), Microsoft® Windows®, and MacOS® X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL® and its built-in GLUT emulation.
FLTK is designed to be small and modular enough to be statically linked, but works fine as a shared library. FLTK also includes an excellent UI builder called FLUID that can be used to create applications in minutes.
Here are some quickstart screencasts
GTK+
QT
wxWidgets
If you're asking about .NET then (assuming that's what Visual C++ 2008 is) then both Linux and Mac OS X users can run .NET applications with Mono.
Since the user interface is so simple, I would advise you to start in Windows with Visual Studio, and keep all the user interface stuff in separate files, decoupling it completely from the rest of your application.
Then, on OS X, you'll get the best visual results by creating a Cocoa application and writing the user interface in Objective C in combination with Interface Builder. You can then easily hook up the interface with your internal C++ code. (The Objective C compiler understands C++ code in the same file as the Objective C code.)
This will let you produce a cross-platform application that looks just right on both Windows and OS X, something that QT or other cross-platform kits will likely never completely achieve.
I'd suggest you look at the Qt toolkit. It contains cross-platform UI elements. It is possible to use this with VS2008.
Gtkmm is C++ and is proved to work in linux and windows with Visual Studio.