How can i make a portable C++ program for Windows with GUI, independent from .NET or other Libs?

c++, portability, user-interface, winapi, windows

Solution

You can either use a library that can be statically linked (MFC, WTL) or use Win32 API directly.

Problem

I want to make a C++ program with Graphical User Interface, to be running on Windows platforms. I want it to be independent from any libraries like .NET. The reason I want this is because I want this program to be able to run everywhere, in every version of Windows (XP, VISTA, 7 - 32 & 64bit) without the user to be bound to have already installed a library like .NET. Also, I want it to be portable: the whole program to consist from only one exe file. So to summarize: How can I make an one-exe-file GUI C++ program, able to run on all versions of Windows, without the need of pre-installed libraries on Windows from the user that uses it? I have already MS Visual C++ 2010 Express and Eclipse with Cygwin's G++ compiler installed on my system. Notice: I don't mind to use any libraries for windows GUI design if there is a way to embed them inside the executable file of the program.

Original source

Related problems