tags:

views:

990

answers:

8

I found this site, http://www.apitalk.com/document.php?id=1184207999_1 and I'm not sure if this site is using ATL, STL, MFC, or just calling API functions directly.

I have done console programming with C++ and graphics programmign with C++ in Borland, but I've have never done Win32 C++ programming and I'm curious if anyone knows of a good site to start with?

Does anyone know of any good sites to recommend about getting up and going fast with Win32 API C++?

+13  A: 

Windows API at MSDN is a good start I think.

Also, consider getting yourself a copy of Charles Petzhold's Programming Windows.

Camilo Díaz
Also check out Raymond Chen's blog The Old New Thing at http://blogs.msdn.com/oldnewthing/default.aspx
dgvid
Petzhold still is the standard, unfortunatly it does not cover many of the common controls, that'a a pitty. Regards
Friedrich
+3  A: 

The link you provided is calling Win32 API functions directly.

One site I used for learning the basics is http://www.winprog.net/tutorial/

Tarsier
+1  A: 

This is 'plain Win32 API programming' by calling Win32 API functions directly.

You can find some interesting articles on plain Win32 programming in TheOldNewThing blog.

You can find many interesting Windows C++ code examples by exploring CodeProject.com. I would recommend this as a good starting point, although it may take you a while to figure out which is plain Win32 API and which isn't, but you can always google all the functions they call, and try to figure out whether they are in the Win32 API, or somewhere else (MFC, AFX, etc).

A: 

If you want a good modern way of programming close to the Win32 API while using C++, then I would recommend using WTL.

Windows Template Library (WTL) is a C++ library for developing Windows applications and UI components. It extends ATL (Active Template Library) and provides a set of classes for controls, dialogs, frame windows, GDI objects, and more.

It's a somewhat more friendly environment than plain Win32, but is not so much an application framework (just a windowing framework).

Frank Krueger
A: 

I would advise being careful with Win32 programming using the Borland free C/C++ compiler tools, while they can generate Windows programs, they have some quirks. For example, you must declare a resource (.rc) file in a pragma statement in your source code file in order for Borland to use it in your generated .exe (this isn't the only way to do this, but it is the easiest I've found).

See this link for more information.

MetroidFan2002
A: 

http://www.winprog.org/tutorial/ The Forger's Win32 API tutorial. Seems to be pretty popular, though it takes a good amount of time to learn with it properly.

http://winapi.foosyerdoos.org.uk/index.php - Excellent as a reference. Gets you started fast. My favorite when I was new, since it provides a lot of basic, working examples.

Once you get a good feel for it, you'll probably want to mostly use the MSDN and Google to get information.

Brian
A: 

Thanks for all your suggestions. I think I should also iterate that i'm a .NET C# developer by day. I just thought knowing the Windows API might be a useful skill. I've done some MFC programming in the past and I found the library needless complicated. I want to write a utility that monitors lo level mouse movements and also manipulates the display by turning off the screen, i figured the Win32 API was a good place to start.

+1  A: 

I'm so excited to be able to share this link.. this site and its awesome tutorials have been around as long as the web. Back when I was a C programmer for years, and I wanted to get into C++, I was having a hard time. I was using a C++ compiler to compile my C code and thought I was doing c++. This site was a key in my early C++ learning on object oriented programming and also the Windows API. It was Windows 3.0 at that time though. This is absolutely the best tutorial, in my opinion, I've ever come across.

http://www.relisoft.com/win32/index.htm

stephenbayer