Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

This question already has an answer here:

I know how to program for Unix, Mac, and iOS, but I have no clue when it comes to Windows. Now I have a specific project that requires building a Windows version of a Mac OS X desktop app. But I have no idea where to start learning. What languages can I build the app in and how do I package it for download and distribution? What tools can I use? Can I use Vim and something resembling the Unix command line?

I can program well in Ruby and Objective C, but I'm guessing I won't be able to use either of these to make a Windows desktop app.

Any tips?

share|improve this question

marked as duplicate by gnat, MichaelT, Martijn Pieters, GlenH7, Frank Apr 12 '13 at 6:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Are you a student? If so you can get Visual Studio (probably the most common Windows development environment and toolset) for free using either MSDNAA or DreamSpark. –  Billy ONeal Jul 25 '11 at 19:17
I'm not. But it sounds like you have to PAY to develop for Windows -- something I'm not used to coming from Linux and Unix! –  dan Jul 25 '11 at 20:18
You don't -- the compilers are all released free in the SDKs. You only need Visual Studio if you want an easier to use environment and all that other nice stuff. (Also, you PAY to develop for a Mac too -- except the price is paid in much more expensive hardware given that it's not legal to run OSX anywhere else) –  Billy ONeal Jul 25 '11 at 20:20
Or, you could use Visual Studio Express which is free and fine for getting started or for small desktop apps. –  Factor Mystic Jul 25 '11 at 20:40
@Dan: Looking at it from the other direction, some would say you just can't get good tools for Linux/Unix, no matter how much you're willing to pay. Others obviously disagree, of course, but I (for one) find most Linux/Unix debuggers quite painful compared to even the free debuggers for Windows. –  Jerry Coffin Jul 25 '11 at 21:52

8 Answers 8

up vote 5 down vote accepted

Some options (non-exclusive list):


My personal favorite for Windows apps.
Pros: native code, no large runtime packages, nice commercial quality IDE, super fast compile, nice framework. Cons: no free version, not as popular as it once was.


I suspect the most popular tool for in-house/vertical market windows apps. Pros: Lots of resources/support available. Free version of VS if you need one. Con: Requires .NET runtime be installed on end user's machine, which can be an issue for mass market software.


(See C#, only not as popular)


Pros: Native code, lots of resources, minimal or no runtime library required for distribution. Fast. Can be used for anything, including driver development. Free IDE's available, such as Visual Studio or QT Designer.
Cons: Big learning curve.


Pros: cross platform, free. Cons: Java's not really focused on creating Windows apps, so they tend to look a little rough around the edges. Requires large runtime.

For packaging installation, you'd use either Windows Installer, or a self contained installation system such as inno setup or installshield.

share|improve this answer
I like the Java option -- which means I would be able to program the thing in Clojure. How rough does a Java app look around the edges on Windows? And could I avoid having to buy Windows development tools if I go the Java route? –  dan Jul 25 '11 at 20:25
+1 For delphi, at least there is finally an inexpensive starter edition at least. I think it's the same as professional, except you can't use it to print more than 1000 dollars. –  Peter Turner Jul 25 '11 at 20:50
@Peter: A quick look at their Feature matrix indicates there are other differences as well. –  Jerry Coffin Jul 25 '11 at 21:45
Pretty sure that @dan means "not like a 100% native windows app" and not "broken and ugly" when he says rough. But the Java apps I've used are all internally consistent and act like expected so I don't see a problem here. The "express" edition of the windows tools are free, that's a non-issue I think. –  Patrick Hughes Jul 25 '11 at 21:50
Nitpick: VB.NET is probably far more popular for in-house software than C#. Also, Java apps don't look anything at all like native Windows applications. Not a good option for most people. –  Cody Gray Jul 26 '11 at 8:49

The easiest way to get into it is to use VisualStudio Express Edition (there's flavours available in VB.NET, C#, and C++ - and the Express Editions are FREE!!). It has a template for a GUI windows app, that will have a single window open when you run it. It's a good starting point. You can also look into WPF, which VisualStudio Express can also do (well, the C# 2008 edition could).

I'm pretty sure you could use Vim and the commad line too, if you really wanted to.

share|improve this answer

Petzold's book is still the reference for beginning Win32 programming. (Edit: It appears Amazon doesn't have any more copies -- try this if you want a print copy) The book was last updated for Windows 98, so there are quite a few differences from the API it describes, but most of them are easy to figure out from looking at MSDN docs -- the Win98 basics still apply to modern apps. Depending on what you're trying to do though, you may wish to not use the Windows API at all, and use Winforms or WPF instead.

You can build Windows applications using most any language, including Objective-C. (At least, I believe MinGW supports Objective-C) However, you will not have access to any Apple specific APIs; even basic things like NSString.

What tools can I use? Can I use Vim and something resembling the Unix command line?

You can use vim, but you're not going to have anything like a Unix command line out of the box. (Windows and Unix use vastly different models under the hood) You can install emulation layers (e.g. Cygwin) to make some Unix tools run on Windows, but the average user probably will not use things like that.

share|improve this answer
There's no reason to not use .NET when getting started with desktop development on Windows. Which means intimate knowledge of Win32 is not as relevant as it used to be. –  Factor Mystic Jul 25 '11 at 20:39
@Factor: There are plenty of reasons to not use .NET on Windows. Not all of us can impose 300MB+ prerequisites on our customers. –  Billy ONeal Jul 25 '11 at 20:53
You're using Windows already... the framework is already there –  Factor Mystic Jul 25 '11 at 20:57
@Factor: No, the framework is not shipped with Windows XP. –  Billy ONeal Jul 25 '11 at 20:58
The latest version of the .NET Framework is not shipping with any current version of Windows. It's rarely an option to assume that it's going to be there. Keep in mind that Windows is not a .NET Framework delivery channel. –  Cody Gray Jul 26 '11 at 8:54

I just published a series of 6 short articles (ok, Microsoft published them, I wrote them) on writing a Windows application in C++ with no MFC, no ATL, just C++. I hope it helps you assuming C++ is a language you're willing to try this in. It includes a section on getting Visual C++ Express.

share|improve this answer
+1. I KNEW I had read a post like this recently; just couldn't remember where. –  Billy ONeal Jul 25 '11 at 20:22

Start with maybe the Win32 API. However, I'd look into MFC if you don't like pure C or you aren't good enough in C++ to integrate the API into an object oriented format.

.NET is a complete Windows framework, albeit slower than native based alternatives such as MFC/Win32. It's easy to use and learn (but you have to use a supported language such as C#, C++, and VB.NET if you want a seamless integration).

I'd Google around some and try to find a library for Objective C. That's your best bet if you don't want to learn a new language.

share|improve this answer
I'm not a Windows programmer, but isn't MFC pretty outdated at this point? I would think most Windows programmers use .NET (usually with C#), or perhaps Qt if cross-platform support is required. –  Charles Salvia Jul 25 '11 at 19:07
It's not outdated. It's still used for native development. However, if you want to integrate your application with the web or write a quick fronted, then .NET is the best way to go. –  David Young Jul 25 '11 at 19:09
@Charles: .NET is not a native app. MFC might not be the newest or best designed library out there, but it does get the job done with a lot less code. The issue though is that you need to understand how the underlying Windows API works before MFC makes sense. Qt is often unsuitable for several reasons. –  Billy ONeal Jul 25 '11 at 19:09
@David: That's a straw man argument. "Every nuance" is not "an understanding." You need to have your head around basic things like window classes and message pumps before any MFC program will make sense. –  Billy ONeal Jul 25 '11 at 19:13
@David: I actually do mean the C stuff. That's where things like message loops are defined; therefore it's difficult to understand what's going on without seeing it in that form. I'm not saying one needs to be an awesome straight C Windows programmer, nor that someone needs to have the specific API call names memorized. But how the underlying C bits work for things like message pumps (at least at a high level) needs to be understood before moving to MFC. –  Billy ONeal Jul 25 '11 at 20:58

You haven't given much information, such as: do you hope to reuse some of the Mac code, what type of application, etc...

If I was writing a medium complexity, user oriented greenfield application then I would start by using C# and WPF. Your learning curve will be on WPF (and the MVVM pattern) aspect, not the C# side of things. I recently built an application like this (50+ big screens, ultimately hundreds of screens) and the WPF experience was a joy. WPF loves C# and has obviously been designed to fit in with the MVVM pattern.

If you wish to reuse some of your Mac code (assuming you've kept the business logic in C++), then you could still leverage the WPF route by building your application model in C++ and leaving the Windows specific stuff in C#.

If you go down this route, there is absolutely no need for Win32 or Pretzold. These are too low level for WPF. (BTW: I still have my Preztold from when I started with WIndows 3.1)

share|improve this answer

Depending on what kind of application it'll be, you can also use Adobe AIR. It has native process API which means you can actually take advantage of currently running processes in the computer.

share|improve this answer
Huh? AIR is certainly not native; it runs on the Flash virtual machine –  Billy ONeal Jul 26 '11 at 6:25
I didn't say AIR is native. I said AIR can use processes running in the OS. Actually, you can pack your AIR application with a command line tool and trigger it with commands from your app so it can act like a wrapper. –  kubarium Jul 26 '11 at 14:29
I don't see your point. You can do that with most any programming environment. –  Billy ONeal Jul 26 '11 at 16:28
Well, he was asking for alternatives and I presented AIR. I'm not defending it over other programming languages or methods of deployment which can actually be deployed on Mac, Windows and Linux so 3 birds with one stone. My answer/intention was purely based on what was added to AIR because most people still think that AIR has limited capability or AIR is an extension to Flash which is also sometimes considered nothing more than an animation tool. –  kubarium Jul 26 '11 at 16:36

You have lots and lots of options for doing this work:

  1. You can leverage Ruby knowledge and roll your UI in Ruby/Tk, there are also other Ruby GUI toolkits out there.

  2. Perl with Perl/Tk

  3. Java - use Netbeans or Eclipse for a free IDE

  4. C#/F# - Visual Studio Express editions OR SharpDevelop

  5. Python with Python/Tk (or another Python gui kit)

  6. C++ with Win32 API, as already mentioned just get the Windows SDK, the compilers and MSBuild are included.

Should mention here, this list is non-exhaustive, just a list of what I would think of as the most popular. It really depends on the language you want to write in, if you want there are Forth compilers for Win32 and from what I have heard even a .Net implementation so you could write your logic in Forth and roll the UI in C# or some other .Net language.

share|improve this answer
+1 - there had to be a way to do it in Ruby. –  JeffO Jul 26 '11 at 1:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.