How to start Windows development?

I have been a Unix-based web programmer for many years (Perl and PHP). I am also competent with C and C ++ (both bash and a sort of sysadmin sort) in terms of the language itself. I never had a problem learning a new language (I worked with Java several times, and although I could write it, I just didn't like it as a language).

I have no experience with the huge set of frameworks that exist for writing graphical Windows applications.

I have some ideas for Windows applications that I want to work with. I could do this, this is Perl / TCL / TK, but I need something more "native" for various reasons.

Through my current company, I have access to Microsoft tools (and licenses to use them for "development"), so I decided to teach myself something new.

So, I have Visual Studio 2008 installed. I fired it, clicked “New Project”, and then was completely baffled by the many new projects that I could start.

Can someone please help me understand not only the fundamental differences, but also any advice on what things each type lends itself to?

Assuming I am following the C ++ route (I know that the language, therefore, does not select C #), if that is actually more appropriate ...) I could use:

  • Windows forms
  • MFC app
  • Win32

I also know that from Microsoft I can use wxWidgets. I really like wxWidgets (cross-platform, etc.), but how do you compare it with the various Microsoft options above? I also know that Qt exists.

+6
windows
source share
8 answers

It depends on how "close to the metal" you want to be. Choose .Net / C # / Windows Forms / WPF if you want to quickly write Windows-only applications. Choose C ++ / MFC if you decide to learn a platform that is not easy to use and has guardians with 15-year-old code, but gives you unlimited control over every little thing (clarity: MFC is for Windows only).

MFC is a wrapper around the C win32 api, plus some additional useful features that provide standard package functionality. This helps a lot to learn how win32 api works. To find out about this, I recommend "Windows Programming" by Charles Petzold (the so-called "Petzold" from the headman). You can also get started with MFC. Take a look at the many examples and tutorials that are included with Visual Studio and at sites such as codeproject.com.

.Net / C # is much easier to use. It abstracts a large number of Win32 api, but it is still a wrapper, so for some things you need to "reset the level", as before, with Visual Basic. IMHO (and I will probably be modified for this), C # is the new Visual Basic, except that it is not as ugly as the language and that it is statically printed. In fairness, it should be noted that it has some advantages, for example, without requiring a strange VB runtime (but this requires .Net, therefore ...)

+4
source share

C # is the language of choice for Windows development for me. I came from the same background as you, and I found C # incredibly refreshing. I really like this language, and .NET is now my platform of choice. It is also easy to keep in touch with your Unix roots through Mono. .NET is actually a great platform, and you should learn it.

In addition, when it comes to Visual Studio, you should remember that different projects basically indicate which libraries are enabled by default and the build process. If you want to stay with a Unix-style Makefile, you can do window development with Mono.

Alex

0
source share

Windows Forms is by far the most beautiful of them. However, using Windows forms from C ++ simply confuses you if you do not know what you are doing, because then you really use C ++ / CLI, which can be a completely different language. It’s better not to go to C # if you want to go this route.

MFC is probably closest to what you are familiar with. But, again, Windows Forms is much nicer.

0
source share

I would choose C # instead of C ++. For Windows client applications this is not possible. For C / C ++, a dude like you, the syntax learning curve will be short. The difficulty will be to learn the .NET platform, but the costs that you will have to incur anyway.

Once you select C #, just select either Windows Forms or a WPF application. Both are client application types. If you choose a WPF application, you will also need to learn XAML, which is a fairly new, but massively powerful concept.

0
source share

I tried to do some C ++ programming in .Net (Windows Forms). And although it was possible, it was, of course, not a pleasant experience, mainly because you have additional keywords and those that are different from standard C ++. But if you want to learn some more C ++, this is an option.

I myself started working on a project using C #, which works very well. Easy to learn if you have background in C ++.

I would not touch the Win32 API again. This is terrible!

0
source share

If you're just interested in writing graphical applications for Windows, just use the "Windows Form Application". It will start you up with an empty window form and a class that contains your main () method.

The Console Application project is probably the easiest, it just creates a single class file for you using main () and it.

The Class Library project has scaffolding and default settings for creating DLLs.

As a rule, there are no fundamental differences between different types of projects. All they do is set up for some default parameters, and you create some forest code (for example, an empty window form) to get started.

I recommend learning C #. If you know Java, this will not be a big jump for you. The original version of C # was actually designed to be exactly the same as Java, but they have diverged slightly over the years.

0
source share

I think that I would suggest much more to be done for your purpose. If you want to create your own application and want to quickly bring it to the market, and it must be Windows, I would go with C # WF, as others suggested.

If you want to make yourself more able to work, I would go with C # / ASP.Net. This way you learn C #, but also learn more about web development in general, and ASP.Net in particular. I think you will find that Windows Forms is much simpler, comparative, and not worth the time.

So, if I were you, I would build my application so that most of it is separated from the interface. First I learned how to get this code to interact in ASP.Net, and then I will try it in Windows Forms. If you can do this, you will learn many really important .NET infrastructure development skills.

0
source share

IMHO, wxWidgets are better than any of them. For example, I know many people who converted their projects from MFC to wx. WxWidgets has all of MFC (in earlier versions of wx, many classes were clones of MFC classes) and much more. It is not just a GUI library, but you have wrappers for all kinds of common tasks, such as reading / writing XML files, the Windows registry, manipulating various graphic types and image data, classes for converting between character sets, etc. There are also many additional classes on the wxCode website that can easily improve your applications.

wxWidgets is also cross-platform, has full Unicode support and is only going further. If you decide to try, try wxFormBuilder to easily create a WYSIWYG UI constructor (dialogs, windows, ...).

0
source share

All Articles