NO

Author Topic: A question about starting a GUI project in C  (Read 4146 times)

modram

  • Guest
A question about starting a GUI project in C
« on: August 04, 2015, 03:04:19 AM »
This is a general question. I'm not a beginner programmer, but I don't have too much experience with anything like this. So this is mostly an implementation question.

What would it take to create a GUI system in C. What I mean, is that I would like to create my own Windows, text boxes and buttons and etc. both graphically and functionally.

There are a lot of graphics libraries out there. OpenGL SDL, SFML and etc. Some C others C++. If someone codes something like this from the ground up, would I use a system like that?

What exactly are the requirements to do something like this. Where can I get started to organize how I would code this.

The final use of the project, would be for example to use in a Game or a desktop application. The desktop application part is uniqe actually in that I don't require it to interface with windows. In

other words, the application would load as it's own application and the gui would be used in the loaded application game or not. So system interaction is not important, just the GUI part.

Anyone know about this kind of stuff?

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: A question about starting a GUI project in C
« Reply #1 on: August 04, 2015, 08:14:26 AM »
You can first try those Wizards.
Dialog based, if window is fixed and you want to use resource editor.
Normal window, if you want to create controls dynamically.
May the source be with you

Offline jj2007

  • Member
  • *
  • Posts: 536
Re: A question about starting a GUI project in C
« Reply #2 on: August 05, 2015, 12:29:47 AM »
There are a lot of graphics libraries out there. OpenGL SDL, SFML and etc. Some C others C++. If someone codes something like this from the ground up, would I use a system like that?

OpenGL and DirectX are the likely candidates to do advanced graphics programming in C. For 99% of all needs the Windows API, including GdiPlus, is more than enough.

modram

  • Guest
Re: A question about starting a GUI project in C
« Reply #3 on: August 05, 2015, 06:35:47 AM »
Hey guys, I'm pretty good at going head first. I looked around a bit and decided that I'm biting off more than I can chew. I will have to settle for a simpler project, but I'll keep trying to digest as much as I can.

This should be in my signature I think -> When you think you know how, you really don't!

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: A question about starting a GUI project in C
« Reply #4 on: August 05, 2015, 07:38:21 AM »
And here you can freely ask some help ;)
May the source be with you

MichaelW

  • Guest
Re: A question about starting a GUI project in C
« Reply #5 on: August 05, 2015, 07:44:32 AM »
If you are trying to create a gui app, you can't get much simpler than a modal dialog. I posted a set of procedures and a header file that makes it easy to create a dialog template (*) in allocated memory, and create a dialog from the template, here.

* If you don't already know, see the comments in imdialog.c to get an idea of what a dialog template is. And note that a "dialog editor", combined with a resource compiler, also create a dialog template, but instead of being stored in allocated memory it is (normally) stored in the EXE.

A gui app with a complex user interface will be more or less difficult regardless of the library/tools you use. But as my example shows, a simple modal dialog, where the system dialog box manager provides the message loop, can be very easy.
« Last Edit: August 12, 2015, 08:35:26 AM by MichaelW »

henrin

  • Guest
Re: A question about starting a GUI project in C
« Reply #6 on: September 05, 2015, 04:02:35 PM »
Many questions for a simple GUI projects in C.
Win32 is almost perfect, but...

I tried to fill the gap for casual programmers
with SGL - a simple layer on top on Win32

See here : http://forum.pellesc.de/index.php?topic=6788.0