Hi everybody! Im thinking of starting to learn C++, Ive been working with C# for a while now. This maybe a stupid question but, Is it better to use C++ as a windows form application and use the same system I currently use in C# to create my GUI(drag and drop), or is it better to use a GUI toolkit and code it? Will I have the same amount of power with both these options? What are the pro's and con's for the two options, and is one better then the other for a particle reason?
Any feed back would be much appreciated. ~ Committed. :)
5 replies to this topic
#1
Posted 08 January 2011 - 06:04 PM
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.
Science is only an educated theory, which we cannot disprove.
|
|
|
#2
Posted 08 January 2011 - 06:32 PM
Well, hardcoding an UI is not pleasnt I'd say. I think it's the same, power wise; but if you're hardcoding then you understand how the background works if you know what I mean. If you'll choose a GUI library, I'd suggest you pick Qt since it's cross platform and I think you can use the same UI (file) in all languages it supports.
A conclusion is where you got tired of thinking.
#define class struct // All is public.
#3
Posted 08 January 2011 - 11:06 PM
Windows Forms will not teach you c++ because it isn't standrd c++ -- its called CLR/C++ which is Microsoft's enhanced c++ language. Just like c++ was derived from C, CLR/C++ was derived from c++. There are lots of differences between standard c++ and CLR/C++.
If you are concerned about portability -- that is, using the same code to compile on MS-Windows, *nix and MAC, then use a cross compiler such as QT. But if your only concern is MS-Windows then you have a couple more options. To use standard c++ you can either code in pure win32 api, or use a GUI library such as wxWindows (which itself is also portable). If you want to stick with something very close to C# then you will want to use CLR/C++.
If you are concerned about portability -- that is, using the same code to compile on MS-Windows, *nix and MAC, then use a cross compiler such as QT. But if your only concern is MS-Windows then you have a couple more options. To use standard c++ you can either code in pure win32 api, or use a GUI library such as wxWindows (which itself is also portable). If you want to stick with something very close to C# then you will want to use CLR/C++.
Visit Grandpa's Forums, a social networking forum, with family-oriented arcade games, blogs, discussion forums, and photo albums.
#4
Posted 09 January 2011 - 10:23 AM
Thank you for both your replies! Sounds like its better for me to code the GUI. Two more question, does CLR/C++ take away some of the power of C++? And if I use a cross compiler and GUI kit, my program will be runnable on any OS right?
Thanks again! ~ Committed. :)
Thanks again! ~ Committed. :)
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.
Science is only an educated theory, which we cannot disprove.
#5
Posted 09 January 2011 - 11:35 AM
>>does CLR/C++ take away some of the power of C++?
Depends on what you mean by that. CLR/C++ requires .NET framework, so if the target computer doesn't have it then the program won't run. AFAIK all versions of MS-Windows since Vista has it installed. In many ways CLR/C++ is better than c++ because lots of things are simply easier to do with the .NET framework. You still have all the streams and STL containers you are familiar with in c++. I don't know if there is a boost port or not.
>>And if I use a cross compiler and GUI kit, my program will be runnable on any OS right
Not the same binary -- you have to compile the source code for each target os you want to support. If you want to support MS-Windows, *nix and MAC then you will have to get a copy of QT for each of those operating systems and compile your program with each one. There are such things as cross compiler, where the compiler can produce binaries for multiple operating systems, but AFAIK QT is not one of them.
Depends on what you mean by that. CLR/C++ requires .NET framework, so if the target computer doesn't have it then the program won't run. AFAIK all versions of MS-Windows since Vista has it installed. In many ways CLR/C++ is better than c++ because lots of things are simply easier to do with the .NET framework. You still have all the streams and STL containers you are familiar with in c++. I don't know if there is a boost port or not.
>>And if I use a cross compiler and GUI kit, my program will be runnable on any OS right
Not the same binary -- you have to compile the source code for each target os you want to support. If you want to support MS-Windows, *nix and MAC then you will have to get a copy of QT for each of those operating systems and compile your program with each one. There are such things as cross compiler, where the compiler can produce binaries for multiple operating systems, but AFAIK QT is not one of them.
Visit Grandpa's Forums, a social networking forum, with family-oriented arcade games, blogs, discussion forums, and photo albums.
#6
Posted 09 January 2011 - 11:45 AM
Ok, thank you very much for the help! +rep.
~ Committed. :)
~ Committed. :)
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.
Science is only an educated theory, which we cannot disprove.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









