2
  1. What is the mfc, cli and win32? Can you please help me understand how visual studio works in relationship with these 2?
  2. what is the diff between c++ and vc++? When we say "vc++" does it imply the dialog boxes, forms, windows and other gui elements by default?
  3. If i create a console based application in visual c++, without using any win32 programming, does it qualify as a visual application?
  4. Do the boxes, dialog boxes, forms and other gui, come under win32 programming or are they different?
  5. What other kinds of programming are there in c++ other than console based and win32 programming?

Please make it as simple as possible.

ildjarn
  • 62,044
  • 9
  • 127
  • 211

2 Answers2

5

C++ is a programming language. It's compiled, which means you need a compiler to translate the source code into an executable program.

VC++ is a compiler from Microsoft which runs on MS Windows, and compiles C++ code into executable programs for MS Windows operating system.

There are various kinds of programs that you can write in C++, ranging from device drivers to webbrowser plugins. Well, you could even write your own operating system if you fancy that.

To ease your development, compiler developers (and third parties) have written various kinds of useful libraries. MFC is an example of a library (a framework to be more precise), which helps you in development of "visual applications" on MS Windows. There are other alternatives to MFC in the market.

Now coming to your questions:

  1. MFC is Microsoft's framework for creating visual applications in Visual C++. CLI is command line interface. CLI applications typically don't have any visual element except for the command line input---they mostly don't have any menus and mouse interaction, either. Win32 is a generic term for 32 bit MS Windows application. You could also develop for 64 bit Windows.

  2. C++ is a language. VC++ is a compiler. This compiler comes with some additional features, beyond what's available in C++ to ease MS Windows development, specially via MFC.

  3. There is no standard term as a "visual application" but loosely speaking, without graphical elements your application won't be considered a visual application.

  4. Dialog boxes, forms and other GUI elements do come under Win32 programming. You could make use of MFC to ease your development of such Win32 applications, as hinted earlier.

  5. Beyond console based and Win32 Programming: I think you are getting confused because of the various "wizards" that come with Visual Studio when you create a new C++ project in the IDE. There could be several types of wizard configured in your installation; just to give you a few examples: you could also have ActiveX and MFC controls as the "type of application" you want to create.

Jaywalker
  • 3,079
  • 3
  • 28
  • 44
  • 3
    In this context, CLI could be referring to C++CLI rather than a command line interface. – JoeG May 10 '12 at 09:59
  • @jaywalker thankyou. so from what I understand, Microsoft has its own compiler called VC++ which is included in the .net framework along with many other things. And it can make very good applications, as –  May 10 '12 at 21:03
  • 1) we can use a very good and extensive libray in it called the Base CLass Library. 2) when compiled, it produces a platform independent portable intermediate code called bytecode (also known as Common Intermediate Language).This CIL is a Microsoft implementation of the Common Language Infrastructure specification(CLI). 3) Among other types, we can make Win32 applications which are called so, as they are made of 32 bit memory addresses. Also, win32 prog. include programming with all kinds of gui elements. Am i right? Now, my questions difference between a) mfc and bcl. b) cts and cil. –  May 10 '12 at 21:21
  • Also, does the definition of Win32 programming focus more on applications having 32 bit addresses" and less on "apps including gui elements" or is it vice versa? –  May 10 '12 at 21:27
  • @JASMEETBHATIA: This is not a forum. You don't ask questions in comments. You ask questions by pressing the `Ask Question` button. Preferably after having searched for the answer. – Nicol Bolas May 10 '12 at 22:48
  • @NicolBolas I apologize for this, as I am new to this website. I will post these questions anew. –  May 11 '12 at 06:31
-2

Ok, lets start with Windows. Windows is built using C/C++. You can write a Windows program using the functions Windows offers you - this is Win32.

MFC = Microsoft Foundation Classes - a C++ class library that wraps around the Win32-Interface. It is a pretty thin wrapper, that means you still can (and sometimes have to) access the Win32-function. The buttons, dialog boxes, etc. are original controls from Windows.

A console application is designed to run in the command line (a.k.a. dos box). You can use parts of Windows like processes, file system, etc., but no "optical stuff" like dialogs.

VC++ is a term often used for C++ with MFC, or at least C++ under Windows.

HTH a little bit.

dwo
  • 3,576
  • 2
  • 22
  • 39
  • The command prompt is **not** also known as *"dos box"*. It is called command prompt. A console application can display graphical UI. There is no restriction that a console application cannot call `MessageBox`, for example. VC++ is a product name. MFC is part of this product. MFC is anything but a *"thin"* wrapper. WTL, for example, is. – IInspectable Sep 04 '13 at 20:38