| View previous topic :: View next topic |
| Author |
Message |
--Pillboi-- Grandmaster Cheater Supreme
Reputation: 0
Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
|
Posted: Sat Apr 12, 2008 3:52 pm Post subject: Recommendation On Method Of GUI Creation |
|
|
For C programming, what would you recommend using to program a simple GUI in? I'm currently looking at either winapi or GTK+. From what I've seen, GTK+ GUI looks better, but winapi is 1337er. Thanks.
What methods would you use in what situations?
In this case, I'm basically looking for which I should use for a basic output program + load a .txt file.
_________________
Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair. |
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Apr 12, 2008 5:17 pm Post subject: |
|
|
| Just do it with the API, or dialogs.
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Sat Apr 12, 2008 5:22 pm Post subject: |
|
|
Yea, use Win32 API or Dialogs, and if you want to have a Themed Manifest its easy, just add this line to the project.
| Code: | | #pragma comment (linker,"/manifestdependency:\"type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' processorArchitecture=\'*\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\'\"") |
_________________
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sat Apr 12, 2008 5:32 pm Post subject: |
|
|
CreateWindow(Ex)
_________________
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sun Apr 13, 2008 8:45 am Post subject: |
|
|
Theres quiet a few options you can use.. firstly going the API methods you could use Dialogs via resources and DialogBox API or CreateWindowEx.
You could also use MFC which is similar to the Dialog method with more automation and event handling done for you.
Or you could go the outside lib method using stuff like wxWidgets or GTK+ like you mentioned.
I would personally say go with Dialogs or CreateWindowEx. MFC is the devil, and using outside libs for something you can do fairly easy yourself just adds more 'weight' to your project.
_________________
- Retired. |
|
| Back to top |
|
 |
--Pillboi-- Grandmaster Cheater Supreme
Reputation: 0
Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
|
Posted: Sun Apr 13, 2008 12:11 pm Post subject: |
|
|
| lurc wrote: | Yea, use Win32 API or Dialogs, and if you want to have a Themed Manifest its easy, just add this line to the project.
| Code: | | #pragma comment (linker,"/manifestdependency:\"type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' processorArchitecture=\'*\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\'\"") |
|
What's a manifest?
Google says that code is Visual C++: http://www.codeguru.com/forum/showthread.php?t=408061
| Wiccaan wrote: | | I would personally say go with Dialogs or CreateWindowEx. |
By the sounds of it, CreateWindowEx is easier to use, right?
Isn't wxWidgets designed for C++, although I guess it would also work for C.
Thanks everyone else for your answers as well.
Edit: Links:
http://winprog.org/tutorial/
http://zetcode.com/tutorials/winapi/
http://www.2dgamecreators.com/maxgui/CreateWindow.html
http://www.rohitab.com/discuss/lofiversion/index.php/t11408.html
Although these last 2 on CreateWindowEx are OK. They do not explain things like Menus, Dialogs and Buttons. Any suggestions for CreateWindowEx tutorials if it is the way I should go?
_________________
Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair.
Last edited by --Pillboi-- on Sun Apr 13, 2008 12:20 pm; edited 1 time in total |
|
| Back to top |
|
 |
Jani Grandmaster Cheater
Reputation: 2
Joined: 29 Dec 2006 Posts: 804
|
Posted: Sun Apr 13, 2008 12:17 pm Post subject: |
|
|
| wxWidgets > GTK+ :)
|
|
| Back to top |
|
 |
--Pillboi-- Grandmaster Cheater Supreme
Reputation: 0
Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
|
Posted: Sun Apr 13, 2008 12:22 pm Post subject: |
|
|
Haha, that was quick. I think, I'm going to use either API or CreateWindowEx by popular opinion But Thankyou.
_________________
Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair. |
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Sun Apr 13, 2008 3:47 pm Post subject: |
|
|
The Manifest file is the Themed look you get, like for Windows XP, you get the XP Themed buttons, etc.
_________________
|
|
| Back to top |
|
 |
--Pillboi-- Grandmaster Cheater Supreme
Reputation: 0
Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
|
Posted: Sun Apr 13, 2008 3:56 pm Post subject: |
|
|
Thanks Slovach, that's very useful!
| lurc wrote: | | The Manifest file is the Themed look you get, like for Windows XP, you get the XP Themed buttons, etc. |
Ahhh, ok. Nah, I just want a simple window. Thanks.
_________________
Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair. |
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Mon Apr 14, 2008 8:42 am Post subject: |
|
|
In my opinion, Dialogs are a lot easier then using pure CreateWindowEx. With Dialogs, you have a drag and drop interface via a resource editor to create the overall look of the project, you will still have to do code all the events for each object and such, but the designing part of the GUI is done easily.
With CreateWindowEx, you have to create each control by making a call to CreateWindowEx. With the call, you have to position everything by hand which could take a while overall to get the GUI perfect.
I'm not sure if you can use wxWidgets with pure C itself. But it works great with C++. It also can be used in other languages like C#, Python, Perl, and a few others. I still suggest avoiding the use out outside libs like this to do GUI stuff, really no reason for it.
_________________
- Retired. |
|
| Back to top |
|
 |
--Pillboi-- Grandmaster Cheater Supreme
Reputation: 0
Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
|
Posted: Mon Apr 14, 2008 10:39 am Post subject: |
|
|
In that case Wiccaan, I choose you, dialogs! Any recommended resource editors?
_________________
Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair. |
|
| Back to top |
|
 |
Jani Grandmaster Cheater
Reputation: 2
Joined: 29 Dec 2006 Posts: 804
|
Posted: Mon Apr 14, 2008 11:39 am Post subject: |
|
|
| Wiccaan wrote: | | I'm not sure if you can use wxWidgets with pure C itself. But it works great with C++. It also can be used in other languages like C#, Python, Perl, and a few others. I still suggest avoiding the use out outside libs like this to do GUI stuff, really no reason for it. | Ah yeah. I didn't notice that the topic poster was talking about C. My bad.
| x0r wrote: | | Jani wrote: | | wxWidgets > GTK+ :) |
Qt > wxWidgets :) | Ah hah! I guess I've to take a look at Qt when I've time.
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Mon Apr 14, 2008 1:36 pm Post subject: |
|
|
| --Pillboi-- wrote: | | In that case Wiccaan, I choose you, dialogs! Any recommended resource editors? |
Visual Studio's?
Add a Resource and choose Dialog. A drag and drop form resource editor should be available.
_________________
|
|
| Back to top |
|
 |
|