Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 361
Zgrkpnr Avatar asked Apr 02 '14 21:04

Zgrkpnr


2 Answers

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.

like image 110
neminem Avatar answered Oct 12 '22 12:10

neminem


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.

like image 44
Kuba hasn't forgotten Monica Avatar answered Oct 12 '22 11:10

Kuba hasn't forgotten Monica