tags:

views:

568

answers:

3

Im trying to learn Win 32 API programming from theForger's Win32 API Programming Tutorial. Should I choose Visual C++ -> Win 32 Project or Windows Form Applicationto get started? Thanks

A: 

Choose the Win32 Project if your goal is to learn pure Windows 32 API. And make sure it's not Managed Extensions for C++!

Since you mentioned a Windows Forms project I assume you're using a more recent (post .NET) version of Visual Studio and so it contains project templates for Windows Forms which were introduced with the .NET framework. Before that you could choose between Win32 or MFC. MFC was a framework for developing Win32 apps and so is .NET - and abstraction to provide a richer and more straight forward experience developing windows application. Learning MFC (or .NET Windwos Froms) is useful but it's not the same (especially for .NET) as learning the Windows 32 API and the Win32 way of doing things and dealing with windows and windows controls.

Miky Dinescu
what's Managed c++?
Managed C++ (or Managed Extensions for C++) is an extension to the C++ language that allows you to target the .NET framework. If you're not familiar with what the .NET framework is, I would recommend reading up on the evolution of Windows development frameworks - things like MFC, COM+, .NET and more recent additions such as WPF/WCF..
Miky Dinescu
I have to admit the managed C++ is significantly easier than MFC was to work with, but using a modified Microsoft only version of C++ made me feel dirty.
NoMoreZealots
Well, managed C++ should feel easier to work with since the whole idea behind it was to eliminate most of the headaches associate with memory management..
Miky Dinescu
+1  A: 

You should choose the Win32 option.

Windows Forms is a .NET thing, completely different from the Win32 API. theForger's tutorial is about Win32, not .NET.

Edit: If you looking to learn modern Windows GUI programming, as opposed to specifically the Win32 API, Windows Forms would be a good place to start.

RichieHindle
What should I use Windows Forms for? Thanks
Quick and dirty apps are easy to bang out in forms. But learning the Win32 Api will have applications even if you are doing a forms app. Win32 apps can be extremely light weight if you directly implement them instead of using a "Wrapper" class like MFC, or Forms.
NoMoreZealots
Both forms and MFC help with the "bookkeeping" of a windows app, MFC is more target towards using a multidocument view type app, where forms are targeted towards less cumbersome apps. Strait Win32 puts you in complete control and the techniques used there can be applied to the other types of applications.
NoMoreZealots
+1  A: 

You should choose Win32 Project and, if you are using an "express" version of Visual Studio, you should download the recent windows SDK which contains the necessary headers and libraries.

Tamás Szelei