Library for Dialogs and Widgets in Win32 Console Application ( in C ) - c

I've seen a lot of console apps (that run on windows) having some dialog boxes and widgets inside them. Say for example:
A there are a lot more. Now my question: Is there any library (in C) for creating dialogs and widgets in a Win32 Console App?
UPDATE: Seen pdcurses, but it lacks libraries from the real ncurses library like menu.h and form.h. So ss there any other that is easy to use?
Thanks a bunch! :)

you can use ncurses, please check the following question from stackoverflow.com:
Is ncurses available for windows?
there is also PDCurses that support Win32
you can also use the old library Turbo vision, I have never tested it on win32.

The cygwin suite should contain a complete port of ncurses.

if you ou can get hold of an old borland C/C++ (v3.1 if I remember correctly or 6.0, I guess the former version). It has a framework to get just the same that you showed in your picture.

Related

Allegro5 with C - making program

I'm making program using Allegro5, but I'm not familiar with the library yet. I just want to know what is possible with this library.
I have to do 'color correction of image' (contrast, brightness, etc.) and I thought about:
-making buttons (like in normal windows program),
-scrollbars,
-file loader - I click on the button and I'm allowed to jump through directories on my hard drive and pick image file i want to edit in my program
-opening windows in allegro window (for the preview or something)
etc.
I want to use for that as much OOP as I can (i know, it's C). Is it possible to do all of that in C and Allegro5, or i need windows libraries and other stuff as well?
Thanks in advance for your replies. :)
Yes, you can do all of those things, but Allegro 5 is primarily designed for games and not GUI applications. It has support for native menus (5.1 series) and dialogs, but you're on your own regarding buttons, sliders, etc. (There are some third party GUI libraries available, but none of them would look like a native application.)
So if your program is basically a GUI application, then you're probably best off using something like Qt or GTK as your foundation, and only using a graphics library as needed.

Getting OpenGL setup on Windows (mingw32?)

Compiler is mingw32. Language is C99. OS is windows. Graphics card is Nvidia 260GTX
I can link against opengl32/glu32 and build against it, but nothing from OpenGL 3.x is included... in fact, I would say its probably missing 2.x extensions!
GLEW and GLM are both C++ and doesn't work with straight C. Glee doesn't have any mingw32 binaries (and doesn't build cleanly on my system).
I'm using SDL and that has some OpenGL functions (??), but again, looks way outdated.
I just I don't understand the fundamental problem on why it's so difficult to get C/OpenGL working on windows? Why is is so unique? Why doesn't the Khronos provide an SDK/libraries/headers, etc?
I do OpenGL via Java/lwjgl and takes no time to set it up and get it compiling/running.
In Windows anything above OpenGL-1.1 is only accessible through extensions. This is how it has been designed and how it goes. GLEW works perfectly well with plain C (if I'm not mistaken GLEW is written in plain C).
Khronos cannot provide a SDK because actually providing the OpenGL API is a task left to the operating system vendor and in Windows the graphics drivers are required to provide the implementation. In the case of Windows this is Microsoft, who left the ARB some years ago, in favour of their proprietary Direct3D technology; there used to be heated debates which was the better API, but now that the whole world, except Microsoft settled on OpenGL this time of arguing is over.
Anyway, if you want things to be really easy, instead of GLUT, SDL, etc. use GLFW http://glfw.org, a really excellent OpenGL framework, that does all the hard things for you, does extension loading and OpenGL-3 context setup if you ask it so (you still need some extension wrapper to use extensions in your own code – however creating a pure OpenGL-3 context requires some proxy context, loading a few extensions using that and use the functions obtained to create a real OpenGL-3 context. Just for clarification).

How to create a C Program in a GUI window?

I have a bunch of simple programs that I would like to display in a GUI window rather than a DOS terminal. How can I accomplish this? Do I need to call upon a library or what? Thanks.
You will need to use a library to do this; the C language does not define any windowing or GUI constructs. Since you're talking about DOS terminals, I'm assuming that you're in Windows, and so you might want to look at the Windows API, which is a C library with all sorts of powerful windowing tools. You might also want to look at one of the many wrapper libraries that are layered on top of this API, like MFC or WPF.
you need to create a windows application project in your compiler, any compiler i know has that option, and include the windows.h library (#include ).
Have a look at the gtk library http://www.gtk.org and if you feel comfortable with c++ i recommend you wxwidgets GUI framework http://www.wxwidgets.org.

What are some choices to port existing Windows GUI app written in C to Linux?

I've been tasked with porting an existing Windows GUI app to Linux. Ideally, I'd like to do this so the same code base can be used to build either the Windows version or the Linux version. I'll be doing my work on Ubuntu 9.04. After searching around, it's unclear to me what tools are best suited to help me with this.
A list of loose requirements would be:
The code is in C, not C++, and should compile to build both Windows and Linux versions. Since it's existing code, and fairly large, converting to a managed language like .NET is out of the question for now.
I would prefer if I can use the same dialogs in both systems. In Windows, putting up a dialog is pretty simple. You build the dialog in the Resource Editor in Visual Studio, then call DialogBox() API, and handle the event messages. I would really like to find something that can do the equivalent on the Linux side.
It would also be nice to have a good IDE similar to Visual Studio.
Any helps or hints would be appreciated.
Thanks,
Winelib should let you compile Win32 code under Linux with only a few modifications.
Since your code base is in C, I'd suggest using GTK+. It's a cross platform GUI toolkit. For instance, Pidgin instant messenger GUI is created with GTK+. Glade user interface designer can be used to graphically design UIs.
If you're on a tight budget, and don't mind taking time to work around a fair number of limitations, Winlib is an option. If you're shorter on time, and have a larger budget, you might want to look into Mainsoft instead. It's not exactly perfect, but I believe it supports a considerably larger part of the Win32 API (at a correspondingly higher price).

Good Gui editors for win C programming

I am trying to get back to C programming in windows.
I normally use codeblocks for the code and for the gui I used Resource Editor from radasm, but it seems it's no longer available.
Anyone know of a simple program that will let me create dialogs, edit existing resource files and such easily?
Thanks
Qt Creator is capable of doing all those things, if you choose to use Qt for your project.
Borland C++
Dev -C++
Eclipse CDT
LCC-Win
V IDE
WideStudio
Ultimate++
wx-Devcpp
wxWidgets
You could try GTK gtk.org.
You can find the tutorials here
Glade is the preferred RAD tool for resource editting

Resources