Computer Science Canada My First GUI Program |
Author: | rar [ Mon May 31, 2010 11:11 am ] | ||||
Post subject: | My First GUI Program | ||||
Hello I'm working with Dev-C++ and I'm trying to create a program in C with a GUI. Being as I've never done this before, I start with their pre-made Windows application so that I can start with an idea of what code needs to be present for a program to have a GUI. Here is the code they give:
My first question, although probably not at all important at this stage, is How do you enable a File menu (meaning the menu at the top that has File, Edit, Help, etc.)? I see code that says:
Based on the comment, I'm assuming that NULL can be replaced in order to enable a menu, somehow. I'm just not sure what to replace it with. This will be the best way for me to learn in the time that I have (being as I will soon be required to make a program with a GUI by a side job I'm working at) and I would like to learn from the code already given from Dev. So if anyone could help me out, it'd be much appreciated!! |
Author: | Tony [ Mon May 31, 2010 11:44 am ] |
Post subject: | RE:My First GUI Program |
Look up the .h file that has CreateWindowEx defined. Those have documentation... sometimes. |
Author: | rar [ Mon May 31, 2010 11:51 am ] | ||
Post subject: | RE:My First GUI Program | ||
This is what I found for windows.h in the files that came with Dev.
|
Author: | rar [ Mon May 31, 2010 11:54 am ] |
Post subject: | RE:My First GUI Program |
With Google, however, I found this link: http://msdn.microsoft.com/en-us/library/ms632679(VS.85).aspx Which seems to explain the syntax for the function in question. |
Author: | BigBear [ Mon May 31, 2010 1:46 pm ] |
Post subject: | RE:My First GUI Program |
Since your using dev C++ and want to start learning graphics I would suggest going to Tools -> Check for Updates/Packages... Then select devpacks.org and Check for Updates then select Allegro and install it. Once it is installed go to new -> Project then select the multimedia tab and allegro. and you can start using the allegro graphics library documentation found here http://www.allegro.cc/manual/ |
Author: | TerranceN [ Mon May 31, 2010 2:44 pm ] |
Post subject: | RE:My First GUI Program |
I agree with BigBear, use Allegro or SDL or SOMETHING other than the Win32 API if you can. Win32 is pointlessly confusing, but if you insist here is a tutorial on adding menus. |