windows forms and C#?

I keep looking for tutorials on how to make a windows form application in c++, but all I find are tutorials on how to make it in C#. Why are there tutorials for C# and not C++? Do I have to learn C# to make a windows form app?
If you are using .NET and C++ as your language then it should be pretty much the same between C# and C++ (if not almost identical).

Windows Forms is merely Microsoft's own implementation of a wrapper around the Win32 API/GDI. The API is going to be the same to you in any language.

If you are not using .NET, Then you need to either learn Win32, or get another GUI Toolkit.

Note: you MAY be able to use the Win32 SDK, but I am not sure as I don't like Windows Forms much. And it's now being succeeded by the WPL.
If you are using .NET and C++ as your language then it should be pretty much the same between C# and C++ (if not almost identical).


Does that mean that I can use the code in the C# Windows Forms tutorials and run them as a .cpp file it will work?

Yes, I am using .NET.
You can almost run them in a .cpp file. There maybe some slight differences. But Visual Studio generates alot of code for your when you select "Windows Forms App". You click and drag a button onto your form, double click it to add a click event etc.
The examples in VS are also often in C# rather than C++.
As Zaita said, the languages are close enough that you can usualy figure out what you need for C++ from C#.
There are also some which have both C#and C++, so looking at these (if you cna find one) can help fiigure out how to 'convert' the others if not sure.
closed account (z05DSL3A)
gsingh2011,

It's not a tutorial but you may want to bookmark the following page:
http://msdn.microsoft.com/en-gb/library/68td296t.aspx

Sidebar
I prefer C# for the vast majority of my .Net work.
Last edited on
@Grey Wolf. I agree with your Sidebar, If I have to do anything that is going to be small and require a GUI, then C# is usually quite sufficient.

If I need speed, a bit more control and multi-platform optionality then C++ it is.
Topic archived. No new replies allowed.