how to make win32 API program..?

Jan 17, 2010 at 1:33am
hello, i want to begin making c++ programs using win32 API,but what compiler must i use to build that program? i have used minGW but it seems difficult for me because i have to write down unusual command that uses so many lines....and what reference i have to use for studying it?

btw, i have an extra question, how to make GUI program in linux using C++ anyway?
Last edited on Jan 17, 2010 at 1:38am
Jan 17, 2010 at 1:37am
I'd suggest you start off with VC++. Since it was made by microsoft, you can make a new project for win32 immediately and be practically ready to go. That's not as easy with other compilers. Assuming you have a solid core knowledge of C++, you can pick up a good book and launch into winapi immediately. However you won't find any tutorials on this site; it's mainly focused on the core syntax.
Jan 17, 2010 at 1:42am
then how do i start it with VC++??
there are so many options in VC++ (when i want to begin a new project) and i 'm not sure what i have to use to make that win32 API...
Jan 17, 2010 at 1:45am
K, well when you create a new project you'll choose either Windows Console Application (a console app) or just Windows Application (winapi).
Jan 17, 2010 at 1:49am
ok thx 4 the advise....btw how about making GUI program in linux using C++??? is it using win32 API too (LoL)??
Jan 17, 2010 at 1:52am
I'm not sure about that. I believe Linux has its own API but I honestly wouldn't be quoted on that.
And please avoid abbreviations; we try to use real English and not the disjointed variants.
Last edited on Jan 17, 2010 at 1:52am
Jan 17, 2010 at 1:57am
There are lots and lots of different ways of making cross-platform GUIs. Too many to count.
The main ones I know of are GTK+, QT and WxWidgets.
Jan 17, 2010 at 2:00am
about GTK+, is it a compiler or something (like gambas)???
Jan 17, 2010 at 2:10am
It's a widget library. Here is the gallery: http://library.gnome.org/devel/gtk/unstable/ch02.html

You compile the library file (probably libgtk+.a or something similar) into your program and include the appropriate header files, and it lets you build a GUI.

The way it seems to work is like this:
1. set up your GUI
2. tell GTK+ what function to call for any situation that's likely to arise (say a button, buttonA was pressed; GTK+ will call the function (e.g. buttonA_pressed()) you tell it to)
3. hand control over to GTK+. Then, whenever an action occurs, GTK+ handles it rather than you having to.

It has a large and extensive widget library, and graphically it looks good (IMO). I think it's cross-platform but I'm not sure. It definitely works on any OS that can support GNOME, but I don't know if that includes windows and mac OS. I'm fairly sure windows is supported though.
Jan 17, 2010 at 2:16am
I'm pretty sure windows supports GNOME. After all Windows supports GIMP and Pidgin, and they both use GTK.
And chrisname brings up a good point, GTK is amazingly versatile. Just look at the GIMP. The entire interface is GTK+.
Last edited on Jan 17, 2010 at 2:17am
Jan 17, 2010 at 2:31am
I'm pretty sure windows supports GNOME.
I'm pretty sure it doesn't. Not outside of Cygwin, anyway.
Of course, it all depends on what you mean by "support" and "GNOME".
Jan 17, 2010 at 2:36am
Well Windows suppports GTK+. That much I personally guarantee. I'm not sure about gnome in particular.
Jan 17, 2010 at 2:45am
No, all efforts to port GNOME to windows AFAIK have been unsuccessful. I can't imagine why...

But yes, GTK+ is very, very flexible.
Topic archived. No new replies allowed.