Alternate of win32 framework for windowing system on windows - c++

I want to develop a custom window system in c++ that should not depend on win32 library. As an example, Google Chrome has an interface that is not similar to windows own interface. Similarly MPCstar and adobe products have their own interfaces. Please help me where to start for such a project?

You can use cross platform
Qt
or
wxWidgets
but in my opinion Qt is better.

Qt is awesome even if you don't need cross platform support. I assure you after using it you won't understand how anyone could ever develop native GUI on frameworks like Win32 and MFC. Its only shortcoming is the size of the DLLs you'll have to distribute with your app.
BTW is C++ a prerequisite? if not, and you only need windows, use .Net.

I believe Qt should do the trick. I've never used it myself but it is platform independent. I know a few applications that use it, and it seems fine.

Qt and WxWidgets are the better options. And since its GUI I think Qt performs better and has greater support and lots of libraries.
Find Qt here!

Related

c++ gui window cross platform

I would like to make c++ that will work both on Linux and windows as I understand if I use the win32 template in visual studio then it will only work on windows is there something built into c++ like java's jframe that I can use. Also I would like to use any external library at this time.
Here are some cross platform alternatives QT, wxWidgets, Ultimate++. I have used QT, it is intuitive with a huge collection of tools to use in your code. The others are also popular but I have never used them.
I make used of wxWidgets due to it's cross platform and even cross architecture, native look on the OS where it appear. Binary application yields by wxWidgets is small enough thus make it possible to linking statically as portable application. Qt produce huge binary if linked statically (and may be violate qt licensing scheme).
Another reason are licensing flexibly, well documentation and supported by huge community arround the world. wx is considered as mature framework since it first release about 20yrs ago. It's use standard C++ syntax and preprocessor that will make you easily switch from plain C or C++. Complete library are available ranging from appeal window GUI, string, network, stream, webview, xml, and wx is playing very well with 3rd party library as such database SOCI, Asio, etc ....
You may try start to code with wxWidgets easily using Eclipse-IDE and wxFormBuilder as GUI designer. Plese check my experience for ease setup it's IDE+Toolchain. This wx installer can be used do develop, test and run wx application on Linux desktop, and then deploy the binary on Raspberry Pi is available for another board target beside Linux x86_64.
http://yasriady.blogspot.co.id/2016/01/raspberry-pi-toolchain.html
There is a cross-platform application & UI development framework called Qt. I think it meets your requirements. Click here for more info.
There is a long list of both active and dead cross-platform C++ UI libraries here: https://philippegroarke.com/posts/2018/c++_ui_solutions/

Is it possible to create a C++ GUI with Visual Studio?

Can we create C++ GUI applications with Visual Studio or do we need QT like cross platform softwares?
(By the way, I am assuming if I create a GUI with C++ it would be a cross platform application because as far as I know C++ is a cross platform language)
For some of you maybe this is a very obvious question but I couldn't figure out.
The C++ language is cross-platform, but its standard libraries don't provide anything specifically for any GUI development. For that, you need a C++ GUI framework/library. Qt happens to provide just that and it's also cross-platform.
So no, without the use of some cross-platform GUI framework, your application not only won't be cross platform, it simply won't have a GUI at all, since C++ standard libraries don't provide this functionality.
If you use one of the GUI frameworks available only for Windows, like MFC or Windows Runtime, you're not cross-platform.
There are no GUI libraries built directly into c++. Therefore, any GUI you built using c++ would not be cross-platform. There are a couple GUI libraries that come with Visual Studio - MFC and ATL are both fairly common. Neither are cross-platform, however. That doesn't stop you from using some other GUI framework, of course, if you include it. There are plenty to choose from, including ones that are cross-platform.
Just because a language is system-independent, doesn't mean people haven't written frameworks for it that aren't system-independent.
C++ has no standard, built-in GUI library. If you want to make cross-platform GUIs you must use an add-on library like C++, GTKmm, wx, etc.
If you're OK with targeting Windows only, MFC exists and is included with Visual C++.
If You want multi platform application, You should concern using Qt. It makes multi platform development easier by providing API for handling both Windows and Linux (and others). You can use Qt in Visual Studio easily. And is really easy to learn. Check official Qt docs for integration tips.
OK, the point is that qt claims (and prooves) to be platform independent. It shouldn't matter at least if you compile it on a windows platform using either the MinGw GCC or MSVC toolchain.
The difference is, if you use Visual Studio's integrated GUI support, you'll end up with their proprietary, non portable CLR/CLI implementations, and the code won't be portable for other platforms.

Can you program a GUI in C++ that works on both Windows and Linux operating systems?

I have been learning C++ for a while now, and so far I love it. But I have been stuck at the console application level. I have built C# programs for a few years so I love having a GUI and not do everything via console.
Console programs when compiled will work on both windows and linux, which is great. When I was searching GUI C++ tutorials I could only find tutorials for windows specific GUI applications.
So my question is this, can you program a GUI in C++ that when compiled with run on both windows and linux? If this is not possible, can someone point me to a great place to learn windows and linux GUI?
I suggest you to use Qt by Nokia:
http://qt.nokia.com/products/
It is free, very powerful, very easy to use, and well designed. And there is also a Visual Studio Add-in available:
http://developer.qt.nokia.com/wiki/QtVSAddin
but you can use their own cross-platform IDE called Qt Creator as well.
You can use wxWidget library.
Yes, you need to use a cross platform GUI toolkit like WxWidgets
gtk and gtkmm http://www.gtkmm.org/en/
Indeed, using cross-platform GUI libraries (like Qt, Gtk, WxWidgets) help you to have the same source code working on Linux and Windows. I recommend Qt if coding in C++.
But there is no way to build an executable working on both systems (unless you use wine to emulate Windows on Linux, which I don't recommend in your case).

C++ and graphics

I have searched the web for information on creating GUIs(Games, Forms etc) in c++, I have found that OpenGL, Direct X and .Net framework can do this. The question I ask is which one is better to learn, what library for GUI in c++ is the most popular in industry. I know this is a newbie question, but if some on could lead me to the correct path it would be greatly appreciated.
OpenGL and DirectX are different to .Net framework. OpenGL and DirectX are for game development (Graphic acceleration) but .Net framework is for .Net development. If you use .Net framework then your program is not compiled to native code, it will be compiled to MSIL (Microsoft Intermediate Language) then .Net translate it to Native code at run-time (for the first time).
If you want a GUI toolkit for your C++ program, Qt, MFC and wxWidgets are a good choice. Qt and wxWidgets are cross-platform libraries thus your program will be compiled on all platforms (Windows/Linux/Mac OS). But MFC is only available for Windows. Qt is more feature-rich than wxWidgets and maybe is a better choice.
I like QT myself.
Because you mentioned DirectX I'll assume your using windows, for that I would reccomend the basic Win32 API. If you want cross platform capabilities however, I would suggest Qt.
I have searched the web for information on creating GUIs(Games, Forms etc) in c++...
What would work fine for creating traditional form-based applications won't work so well for creating games, and vice versa.
You would be better off using C# with the .NET libraries as the C++ managed extensions can be a little cumbersome. If you must go with C++, then Qt and wxWidgets are both decent options, although you're more likely to find more help and online resources for QT.
If you need to do graphics like games, then you'd better off using a higher level library than directly using DirectX or OpenGL. Ogre3d is one option on the open source side, the C4 engine is an affordable option on the commercial side. If C# is an option, then might want to look at XNA and Unity3d.

Using Qt to make an almost native Windows Application?

I love that Qt is cross-platform but I want to make an application that will call into some Windows specific .dll's. Kinda like Google Chrome does with the glass on Windows Vista/7 (I know Chrome isn't written using the Qt framework just thought it was a good example).
How can I do this in Qt? Is it feasible?
Yes, this is no problem. You just go ahead and do it! Qt itself is just a DLL you call into, it just happens to be the same across different platforms. Just link against the DLLs you like and call them.
There is nothing wrong with using Qt to make a Windows-only application if you like.
As long as you have the relevant Windows SDK headers to hand, and can link with the appropriate libs, then it is easy to mix and match Qt and Win32 code. I use Qt Creator for C++ development which ships with MinGW and includes all the most common Win32 SDK headers and libs. You can even wrap the Windows specific parts of your code with suitable #ifdefs in case you ever come to build for a different platform, e.g.:
#ifdef Q_OS_WIN
#include <windows.h>
void someWindowsSpecificFunc()
{
...
}
#endif // Q_OS_WIN
You can of course call WinAPI functions directly from your Qt code, then it's better to include qt_windows.h not windows.h.
If you just want to add the cool new Windows 7 features to your application then you are better of using a dedicated Qt add-on. There is one called Q7Goodies.
Fearlessly go ahead an write your Win-specific app. You can utilize all the Windows DLLs you want. In this sense, Qt has no limitations. You will still be gaining the advantages of those nifty Qt layout components and customizable skinning. In terms of skinning there is no better framework that Qt. Your users will love all the resizable dialogs you provide them with.