I want to make a Graphical User Interface (need advice)
I have almost four months of summer vacation before I go back to the university. I decided to work on a long term project that I can put three hours of work in a day.
I want to make a free, simple software program that integrates video games and community service for my college and community. However, I am having trouble finding out how to make a graphical user interface (GUI).
I need the user to visually interact with the program (I cannot just ask them to interact on a terminal) since I want this for a general audience. Things like a window with buttons and text fields.
I heard GTK+ and QT were good things to use in developing a GUI, but I am not sure what I need to download to have it all working and running. Thanks!
(I have a Windows 7 OS if that helps. I also have Linux on another computer).
Well, both GTK+ and QT are available on both Linux and WinX, which makes cross-platform easier. GTK+ is originally written for C but has a C++ compatibility layer (gtkmm), it is rather easy to learn as there is plenty of documentation.
QT is I believe written for C++ and there should be just as much documentation.
Both are fine, I think QT is slightly more common, but personally I prefer GTK as it provides a better-looking UI. This is however my personal opinion and what I advice you to do is simply look up a few tutorials and make your own decision.
If you use GNOME on that linux box, GTK might be more interesting though ![]()
"integrate video games and community service"
Can you be more specific? That way any of the dorks in here will give a better advice.
HTML5 is hot right now, and will give an advantage in the future (with CSS and Photoshop or any other graphics software). And what you create you can get the whole world to see in a browser.
Lua is great too. If you're gonna learn to program, forget C++, jump directly to Lua. Lua is easy to learn and widely suportted.
Lua + Corona SDK (a framework for developing for iOS/Android, already has GUI elements, so you can focus on the goal and don't waste time.
Plus, what you learn can make you earn some $$
Good luck man.
_________________
One of God's own prototypes. Some kind of high powered mutant never even considered for mass production. Too weird to live, and too rare to die.
If you have the time and want a challenge you can do it using direct calls to the Windows API.
Here's an example of how it works, though you would of course write a wrapper to make it easier. Then maybe write an XML parser or something so you can load the interface from a file.
const int BUTTON1 = 1;
bool quit = false;
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
if(msg == WM_DESTROY)
{
quit = true;
return 0;
}
else if(msg == WM_CTLCOLORSTATIC)
{
SetBkMode((HDC)wparam, TRANSPARENT);
return (long)CreateSolidBrush(0xFFFFFF);
return 0;
}
else if(msg == WM_COMMAND && HIWORD(wparam) == BN_CLICKED && LOWORD(wparam) == BUTTON1)
{
MessageBox(hwnd, "Hello", "Hello", 0);
return 0;
}
return DefWindowProc(hwnd, msg, wparam, lparam);
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
WNDCLASS wc;
ZeroMemory(&wc, sizeof(wc));
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wc.hCursor = LoadCursor(0, IDC_ARROW);
wc.hInstance = GetModuleHandle(0);
wc.lpfnWndProc = WndProc;
wc.lpszClassName = "lol";
wc.style = CS_HREDRAW | CS_VREDRAW;
RegisterClass(&wc);
HWND mainwnd = CreateWindow("lol", "Hello", WS_SYSMENU,
40, 40, 200, 150, 0, 0, GetModuleHandle(0), 0);
HWND text = CreateWindow("STATIC", "Hello", WS_VISIBLE | WS_CHILD, 10, 10, 180, 20, mainwnd, 0, GetModuleHandle(0), 0);
HWND editbox = CreateWindow("EDIT", "Hello", WS_VISIBLE | WS_CHILD | WS_BORDER | ES_AUTOHSCROLL | ES_UPPERCASE,
10, 30, 100, 30, mainwnd, 0, GetModuleHandle(0), 0);
HWND button = CreateWindow("BUTTON", "Hello", WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON, 120, 30, 50, 30, mainwnd, (HMENU)BUTTON1, GetModuleHandle(0), 0);
ShowWindow(mainwnd, SW_SHOW);
while(!quit)
{
MSG msg;
if(GetMessage(&msg, mainwnd, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return 0;
}
Oh, and if you can put up with .NET then try .NET forms. You can use them with C++ using C++/CLI.
_________________
One of God's own prototypes. Some kind of high powered mutant never even considered for mass production. Too weird to live, and too rare to die.
Can you be more specific? That way any of the dorks in here will give a better advice.
The idea is that pre-approved local businesses and organizations submit small tasks called "missions" to a local community. Volunteers can accomplish these tasks and earn points. There are levels that each have their "perks" once a volunteer obtains them. I want it to be available for my university (which recently obtained the President's award for community service).
Unfortunately, I do not have the money to host a website right now and pay for a domain name. I know this would be the easiest way, but I feel forced out of it.
Any ideas on how to do it online? (My University gives me some free space online for a student website, but I could possibly edit it for other purposes).
Windows still has a large market. If you want to reach the masses, one need to at least understand Window Products.
Nice idea, I'd love to see it develop!
What you're trying to do sounds like a great way to learn Ruby on Rails, check first you have if it's installed at your uni.
about the domain, at least try to get "gamename.universityname.edu".
_________________
One of God's own prototypes. Some kind of high powered mutant never even considered for mass production. Too weird to live, and too rare to die.
Hell, just remembered this: if you don't want to complicate, there's already a Drupal profile
http://drupal.org/project/meetu
as you've seen, there are many routes
_________________
One of God's own prototypes. Some kind of high powered mutant never even considered for mass production. Too weird to live, and too rare to die.
| Similar Topics | |
|---|---|
| Intuitive, minimalist interface for Linux? |
23 Oct 2007, 9:52 am |
| Neuro-Interface for the paralyised to play music |
21 Mar 2011, 9:47 pm |
| NZ human interface expert urges Lego to bring back smiles |
15 Jun 2013, 9:54 pm |
| I managed to make some friends - need some advice |
21 Feb 2008, 10:05 am |
