EvilZone

Programming and Scripting => C - C++ => : Chef June 26, 2013, 05:11:35 AM

: C++ programs and cmd?
: Chef June 26, 2013, 05:11:35 AM
Okay so far I have been making these small little programs in C++ and they have all been executed and are in the cmd.


How do I make these projects into having a UI? (Not in the cmd anymore)


Maybe I'm just being pre mature because I haven't gotten too far into the language yet but I'm curious!
: Re: C++ programs and cmd?
: Fur June 26, 2013, 05:23:09 AM
You'll need a GUI library.
There are loads, search for "Windows GUI libraries".

There are a bunch of guides to creating GUIs with the Win32 API, here (http://www.zetcode.com/gui/winapi/) is one of them.
: Re: C++ programs and cmd?
: Kulverstukas June 26, 2013, 06:21:17 AM
GUI's with Win32 API's is probably the most native, but also the ugliest :D
If you want it very easy, try Borland (now Embarcadero) IDE's. They their own VCL and a GUI builder.
Then you could try Qt - originally developed by Nokia but now it is very popular.

As Fur said, there are many, many GUI libs out there.
: Re: C++ programs and cmd?
: 6NavI June 26, 2013, 08:57:28 AM
i also thought about leaving the console program shit but i thought it had to be like that for amateurs but at least am gettin' some hopes that u can use the GUI.....do i need to tutorials for that too...or ?????@Chef ****EZ******
: Re: C++ programs and cmd?
: dense June 26, 2013, 01:53:47 PM
i also thought about leaving the console program shit but i thought it had to be like that for amateurs but at least am gettin' some hopes that u can use the GUI.....do i need to tutorials for that too...or ??? ??@Chef ****EZ******
Doesn't mean if a program doesn't have an UI it's bad/written by an amateur. Of course UIs look professional and are better for the non-tech savvy people, I guess.
Well, you don't need tutorials, every library has it's own documentation so you can use that and there's always examples of how to use it.

Anyway, I suggest Qt because it's modern, cross platform and pretty easy to get into. It also has it's own IDE which has built-in UI designer so you don't have to manually do stuff.
: Re: C++ programs and cmd?
: theifyppl June 26, 2013, 08:40:41 PM
I would also suggest Qt.  I've used Win32 APIs and manually coded GUI's in the past, but I like Qt much more for some reason.  As dense mentioned, it's modern and cross-platform.  Programming GUIs usually requires object oriented programming, so you'll need to get familiar with that.


I suggest finding a book to learn CPP with Qt.  That's what I did, although I never got to finish the book because of other distractions I had during the school year.


The book I used was Design Patterns in CPP with Qt.  Since I still have the book on my hard drive, I uploaded it to mediafire, if you're interested: http://www.mediafire.com/download/pba58noshtkjj5y/0132826453_Design.Patterns.in._P.with.Qt.2nd.Ed.rar (http://www.mediafire.com/download/pba58noshtkjj5y/0132826453_Design.Patterns.in._P.with.Qt.2nd.Ed.rar)
: Re: C++ programs and cmd?
: techb June 27, 2013, 02:22:07 AM
I would, like suggested, use Qt. However, coming from Python I do enjoy Tk a lot.

...herp...

The book I used was Design Patterns in CPP with Qt.  Since I still have the book on my hard drive, I uploaded it to mediafire, if you're interested: http://www.mediafire.com/download/pba58noshtkjj5y/0132826453_Design.Patterns.in._P.with.Qt.2nd.Ed.rar (http://www.mediafire.com/download/pba58noshtkjj5y/0132826453_Design.Patterns.in._P.with.Qt.2nd.Ed.rar)

Y u no use evilzones upload service?
: Re: C++ programs and cmd?
: theifyppl June 27, 2013, 04:08:57 AM
Y u no use evilzones upload service?

My bad, I'm still pretty new here :P
I'll upload it using EZ's upload service as soon as I get back home!


EDIT: Uploaded.  You guys are right, EZ's upload service is intense.  Way faster than mediafire!



: Re: C++ programs and cmd?
: Chef June 27, 2013, 05:53:49 PM
I would also suggest Qt.  I've used Win32 APIs and manually coded GUI's in the past, but I like Qt much more for some reason.  As dense mentioned, it's modern and cross-platform.  Programming GUIs usually requires object oriented programming, so you'll need to get familiar with that.


I suggest finding a book to learn CPP with Qt.  That's what I did, although I never got to finish the book because of other distractions I had during the school year.


The book I used was Design Patterns in CPP with Qt.  Since I still have the book on my hard drive, I uploaded it to mediafire, if you're interested: http://www.mediafire.com/download/pba58noshtkjj5y/0132826453_Design.Patterns.in._P.with.Qt.2nd.Ed.rar (http://www.mediafire.com/download/pba58noshtkjj5y/0132826453_Design.Patterns.in._P.with.Qt.2nd.Ed.rar)

Very nice looking book. I will definitely begin reading this one. What exactly Qt in relation to C++?
: Re: C++ programs and cmd?
: theifyppl June 27, 2013, 06:45:05 PM
Very nice looking book. I will definitely begin reading this one. What exactly Qt in relation to C++?


Qt is a cross-platform application framework written in C++, although it can also be used in several other languages.  For example, PyQt was written to allow developers to use Qt with Python.  More information here: http://en.wikipedia.org/wiki/Qt_(framework) (http://en.wikipedia.org/wiki/Qt_(framework))


And you can also google to find their main website.



: Re: C++ programs and cmd?
: vezzy June 27, 2013, 07:23:25 PM
Additionally, don't think GUI is your only choice. You can also opt for a TUI (text-user interface), akin to old-school BBS, bootloaders, BIOS and games with a library such as ncurses.
: Re: C++ programs and cmd?
: Chef June 27, 2013, 09:04:21 PM
I am thankful I have all these options. However, It's hard to choose on these things when I'm not quite sure what the difference between some of them are. I think I will just continue expanding my understanding of C++ and once I made a few games on the cmd I will gravitate towards a GUI or TUI.
 
Thanks everyone, I'm trying to not get overwhelmed! Will post my first project soon. :)
: Re: C++ programs and cmd?
: Kulverstukas June 27, 2013, 10:12:03 PM
There is an example program made with a TUI using a Urwid lib, which is basically a wrapper for Curses: http://evilzone.org/evilzone-releases/d0xbase/