tags:

views:

286

answers:

4

Hey guys. I'm not new to programming but I am a beginner at C and C++ coding. I only know the basics of the C language and how to write small and simple programs so far. I'm not interested in learning C++ for the long haul but I am interested in becoming a fluent C programmer. My predicament is adjusting to the MS Visual Studio 2008 environment strictly for C programming (not C++). At the moment I've only written some basic C console applications and built them in this environment.

With that said I would love some advice on where to start. I have some decent C programming books to learn from so learning the entire C language isn't going to be a problem for me (I've been programming in Delphi and VB for years). What I need some advice on is picking a good commercial IDE for pure C programming. I want to create GUI applications in Windows and not just console applications. I haven't found many resources for C coding GUI applications in Windows, it's mostly been C++ GUI application development. It seems to me that MSVC++ 9 is pretty much tailored to C++ development with C being the odd man out. Any advice on where to start would be much appreciated.

+4  A: 

I wouldn't be too concerned about the delineation between C and C++ code. If you want to stick to C programming, you can still get the benefits of a C++ compiler. The C++ compiler doesn't force you to write object oriented code it just makes generic, object oriented code more convenient.

You certainly don't need to write object oriented C++ code to take advantage of VC2008. Win32 is essentially a functional API after all (as opposed to an object oriented framework like MFC).

So to summarise, I think a good commercial IDE for pure C programming is the VC2008 IDE. It gives you a very nice debugging environment with no downside if you are choosing to do purely functional C development. To do your GUI development you will need to use the Win32 API. There are lots of good books out there describing the API, but I would recommend "Programming Windows" by Charles Petzold, this gives a pretty good overview of the API. I also recommend "Debugging Windows Programs" by Everett N. McKay and Mike Woodring (I love this book , it is my debugging bible).

Good luck.

Cannonade
Thanks for the info Cannonade.
No problem, I hope you found it useful.
Cannonade
A: 

There is a reason why you won't find many books on writing Windows GUIs in C - it is very, very difficult and long-winded! You will find you need to write at least 10x (maybe 100x) more code than you would do if you used a C++ class library or a RAD tool such as Delphi. Why are you so determined to use C only?

anon
Yeah I knew it was going to be longer winded than doing it in C++. I'm more interested in learning C because down the line I'm wanting to try my hand at writing Kernel Mode Drivers (which yes I know you can do in C++ too). MS also favors C over C++ for driver development. This is just one reason.
A: 

I've never tried it (yet), but Pelles C seems to be something you might want to look at:

Note that VS2009 handles C just fine - I assume that you want the GUI design tools to spit out C code instead of C++. How much help the Pelles IDE gives in this regard, I don't know.

Michael Burr
A: 

I can not see what's so terrible difficult programming windows with the windows api in C. And I surely can not see any good reason to choose C++ over C for that, you won't tell me that MFC is "simpler" than the win api.

Pelles C has a good Resource Editor, and can surely be used quite well. We ourselves use lcc-win32 tools for Win Development and all you can see when running wedit was used with out own tools. So we are quite confident that they work. It needs probalby some time to "sink" in but that's as everywhere. And the complexity is much lower than anything near the modern "tools". Just one question what's so hard about it that makes C++ so much better? There's till Charles Petzhold Programming Windows around which you can easily use to learn C programming windows.

I just can tell we have started writing lcc-win32 more than 15 years ago. And it still runs, and we do not have to "rewrite" any of it, because another Windows Version is out. The whole download is around 5 or so MB and it contains a compiler,linker, assembler, resource editor, integrated development environment, and libraries in the hundreds. Just to download another compiler is elswhere a > 100 MB "Event".

Regards

Friedrich