CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1

    Want to do C++ GUI.

    I think I kind of get the basics. However, I hate the Win 32 API as it appears to be more C, hence procedural, and less C++ object based.

    I have Dev C++, as I heard the Visiual C++ is only like a 30 day free trail bla bla bla.

    Anyway, I want a GUI and it seems that C++ is a terrible language and I'm surprised somebody hasn't tried to upgrade java to make it better as it's API is very user friendly, unlike so far what I'm finding, or, to put it more correctly, not finding, for C++.

    I've already searched for about a full hour.

    I'm quite upset. Is there anywhere that would show me how to do this?

    I thought it would be just like java. Is C++ GUI's terrible or something?

    I think I found a possibly older, non-Microsoft Visual C++.

    I just hate all the procedural stuff and don't feel like going through the Win 32 API.
    Last edited by jedipenguin; May 24th, 2012 at 09:35 PM.

  2. #2
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: Want to do C++ GUI.

    Quote Originally Posted by jedipenguin
    Anyway, I want a GUI and it seems that C++ is a terrible language and I'm surprised somebody hasn't tried to upgrade java to make it better as it's API is very user friendly, unlike so far what I'm finding, or, to put it more correctly, not finding, for C++.

    I've already searched for about a full hour.
    A Google search for "C++ GUI framework" or "C++ GUI library" gives me top five results that include: FLTK, Qt and wxWidgets.

    EDIT:
    Other options include: FOX toolkit and gtkmm.

    Quote Originally Posted by jedipenguin
    I have Dev C++, as I heard the Visiual C++ is only like a 30 day free trail bla bla bla.
    I note that maintenance for Dev-C++ has stopped for years. You could try Code Blocks, or use Microsoft Visual Studio Express edition (both are available at zero price).

    Quote Originally Posted by jedipenguin
    I think I found a possibly older, non-Microsoft Visual C++.
    That sounds unlikely to me unless it is a trademark infringement.
    Last edited by laserlight; May 24th, 2012 at 09:54 PM.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  3. #3

    Re: Want to do C++ GUI.

    I just downloaded the microsoft one. However, if I ever made a commercial product with it, would I get sued? Dev at least says I can do that without being sued.

    However, I can't find a C++ library for GUI like I can for java. Java it comes up easily where as with C++ I'm still looking for a library for API.

  4. #4
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: Want to do C++ GUI.

    Quote Originally Posted by jedipenguin
    However, if I ever made a commercial product with it, would I get sued?
    The last I checked, no. The compiler is the full optimising compiler, and commercial use is allowed. However, you just don't get more than the basic IDE features, as well as certain additional libraries and things related to 64 bit development.

    Quote Originally Posted by jedipenguin
    However, I can't find a C++ library for GUI like I can for java. Java it comes up easily where as with C++ I'm still looking for a library for API.
    I linked you to several libraries. Have you looked at any of them? If GUI is a big part of your program and you already know how to do it in Java, why not use Java instead of C++?
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  5. #5

    Re: Want to do C++ GUI.

    So how do I get most of the libraries then if they don't come with the compiler or IDE?

    I'm confused.

  6. #6
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: Want to do C++ GUI.

    Quote Originally Posted by jedipenguin
    So how do I get most of the libraries then if they don't come with the compiler or IDE?
    Download and install.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  7. #7
    Join Date
    May 2009
    Posts
    2,413

    Re: Want to do C++ GUI.

    Quote Originally Posted by jedipenguin View Post
    However, I can't find a C++ library for GUI like I can for java. Java it comes up easily where as with C++ I'm still looking for a library for API.
    Here's a good GUI library for Windows I can recommend,

    http://win32-framework.sourceforge.net/

  8. #8
    Join Date
    May 2009
    Posts
    2,413

    Re: Want to do C++ GUI.

    Quote Originally Posted by jedipenguin View Post
    I just hate ...
    C++ is for adults. You either stay in the Java kindergarten or grow up.

  9. #9
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Want to do C++ GUI.

    Quote Originally Posted by jedipenguin View Post
    Anyway, I want a GUI and it seems that C++ is a terrible language
    I bet some of the GUI program you use are written in the "terrible" language of C++.
    I'm surprised somebody hasn't tried to upgrade java to make it better as it's API is very user friendly, unlike so far what I'm finding, or, to put it more correctly, not finding, for C++.
    Well, what exactly do you find that is "terrible" about C++?

    Regards,

    Paul McKenzie

  10. #10
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Want to do C++ GUI.

    Quote Originally Posted by jedipenguin View Post
    I just downloaded the microsoft one. However, if I ever made a commercial product with it, would I get sued? Dev at least says I can do that without being sued.
    There is no such thing as the "Dev C++ compiler". The compiler you're using when you use the Dev IDE is g++, version 3.x. That is a very old version of the Gnu compiler, as the latest version is 4.x.

    As laserlight mentioned, Dev-C++ is no longer updated, and seems to have not been touched in years by the original author. On the other hand, the CodeBlocks IDE is maintained and supports later versions of the g++ compiler.
    However, I can't find a C++ library for GUI like I can for java. Java it comes up easily where as with C++ I'm still looking for a library for API.
    You must not be searching very hard.

    wXidgets, Qt, have already been mentioned, and are featured prominently by just doing a google search for "C++ GUI library".

    https://www.google.com/?sesinv=1#hl=...w=1680&bih=949

    Regards,

    Paul McKenzie

  11. #11
    Join Date
    Jan 2009
    Posts
    1,689

    Re: Want to do C++ GUI.

    I recommend Qt. I've used bot it and wxWidgets and Qt is far superior. The only caveat is that it isn't purely C++, they added some things to the library so you have to qmake it instead of make. The QtCreator IDE will create and run the qmake file for you though.

  12. #12
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: Want to do C++ GUI.

    Quote Originally Posted by jedipenguin View Post
    However, I hate the Win 32 API as it appears to be more C, hence procedural, and less C++ object based.
    Yes it absolutely is. Remember that the first version of Windows was released 1985. I wasn't doing any Windows programming at that time but since MS try to be as backward compatible as possible I guess there are still APIs around that was created at that time.

    I remember that in some year in the era of Windows 2 there was a rumor that next version should be fully object oriented. MS either dropped that idea for some reason (backward compability issues?) or it was the upcoming release of MFC that was misunderstood. Anyway, the Windows API is still plain C but as other has mentioned there are quite many C++ GUI frameworks around.
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

  13. #13
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Want to do C++ GUI.

    Perhaps you'd find C# and .Net more to your liking.

    For Visual C++, I would think most of us use MFC, which basically puts a class based wrapper on the Windows API.

  14. #14

    Re: Want to do C++ GUI.

    The terrible thing I guess is that it seems to not have a GUI API, or I can't find it.

    Also, it's in part because my school now has an easier introdcutory course to C++ that they didn't have and I was forced to like learn the whole language in like 4-5 weeks and then go right into data structures, graphs, sorting, etc. I already knew java, but still, it had been hard.

    I am aware that many things are written in C++, maybe that explains all the glitches in Windows.

    Also, I had used UNIX and had to make makefiles, which was annoying.

    Hopefully these IDE's will do it for me.

    Also, since I had to learn pointers and references kind of quickly, I often got confused and couldn't figure out why I couldn't call

    object.method();

    and that I should have called

    object -> method();

    And that when I returned a reference, I could simply return it instead of

    doing this

    return &object;

    Also, Java can work on all kinds of platforms, whereas if I sent a C++ .exe to my Grandma, who has an Apple, and I use Visual C++, then it won't work on her computer.

    I do like operator overloading and things like that. That's a great advantage that java unfortunately doesn't have.

    Anyway, I was upset as I couldn't find a C++ GUI library, or, if I could, there were several that might vary by compiler or IDE, etc.

    Also, will Visual C++ express expire in like 30 days?

    Also, I have a 64 bit computer. Does that mean that Express won't work for me then as it only has a 32 bit compiler?

    I can only seem to get the Visual Developer part for forms. I can't find it for Win 32.

    Also, I can't seem to get it to add a menu bar.
    Last edited by jedipenguin; May 25th, 2012 at 02:24 PM.

  15. #15
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: Want to do C++ GUI.

    If you register the express version it wont expire.

    It works on both 32 and 64 bit platforms and the default is to build 32 bit applications.

    The express version doesn't come with MFC so all you have is Win32 APIs and making a GUI application using that is quite a pain...

    Edit: Oh, if you create a forms application you get a managed c++ application not a native one
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured