MFC

J

john townsley

What are MFC exactly, is this more Microsoft made classes to help with c++
eg windows form environemnt with controls like VB?

I am getting to like C++ but these C++ add-ons like MFC are confusing me.
 
J

Jack Klein

What are MFC exactly, is this more Microsoft made classes to help with c++
eg windows form environemnt with controls like VB?

I am getting to like C++ but these C++ add-ons like MFC are confusing me.

They are just what you think, third-party extensions that are not a
part of the standard C++ language. Microsoft has their own support
groups in the family for them. Since they are
not part of the C++ language itself, they are not discussed here.
 
S

Sagar Choudhary

john said:
What are MFC exactly, is this more Microsoft made classes to help with c++
eg windows form environemnt with controls like VB?

I am getting to like C++ but these C++ add-ons like MFC are confusing
me.

MFC (Microsoft foundation classes) contains a hierarchy of classes.
This encapsulates the user interface portion of the windows API and
makes the creation of windows application fairly simple in object
oriented way. It reduces the amount of code written to create a windows
program to a large extend. It is also very efficient.
It also provides all the advantages normally found in c++.
But its of no use when u are using a different platform than Windows
Only heplful when developing windows application
 
J

john townsley

So if I wanted to do some game programming with C++ and openGL/directx do I
need to know MFC /VCL . Can I just know C++ and bypass these extras
 
J

john townsley

Is this similar to having Visual basic environment, MFC provides this
support
 
S

Sagar Choudhary

john said:
Is this similar to having Visual basic environment, MFC provides this
Visual basic more simpler than using MFC. In VB evrything is visible to
you
and by just clicking you can extend your GUI but using MFC you have to
know the classes for doing that.
Most of the windows applications uses several standard user controls
like
text labels,push buttons,combo boxes, check boxes, scroll bars etc..
You can create these in code using MFCs
 
S

Sagar Choudhary

john said:
What are MFC exactly, is this more Microsoft made classes to help with c++
eg windows form environemnt with controls like VB?

I am getting to like C++ but these C++ add-ons like MFC are confusing
me.

MFC (Microsoft foundation classes) contains a hierarchy of classes.
This encapsulates the user interface portion of the windows API and
makes the creation of windows application fairly simple in object
oriented way. It reduces the amount of code written to create a windows
program to a large extend. It is also very efficient.
It also provides all the advantages normally found in c++.
But its of no use when u are using a different platform than Windows
Only heplful when developing windows application
 
P

Phlip

john said:
So if I wanted to do some game programming with C++ and openGL/directx do I
need to know MFC /VCL . Can I just know C++ and bypass these extras

If you have to ask how to write games, you are not ready to.

Game programming is very hard. Normal programs are 2-dimensional, and only
use limited animation. Games are 3D and animated, so they are a couple
orders of magnitude more complex than business applications.

MFC is flat, and will give you nothing towards games.

To deal with their complexity, game projects come in several layers - the
art formats, the rendering layer, the gameplay engine, and the scripting
layer. Each of these could be in a different language, each uses different
libraries, and each uses different support tools.

Your best bet is to buy a game, such as Quake or Warcraft, that comes with a
"level editor". That means the game shop productized and sold the tools
which their gameplay designers used to architect the game's floorplan,
monsters, and triggers. Paying a little to enter gaming at the top will be
more fun than starting with raw C++ and OpenGL and entering at the bottom.

Your second best bet is to download an open source game engine, from
http://sf.net . Go with whatever language and library you can manage to
install and use to get such a project working. After that, learning the
language and libraries will be relatively easy.
 
A

Alan

john townsley said:
So if I wanted to do some game programming with C++ and openGL/directx do I
need to know MFC /VCL . Can I just know C++ and bypass these extras

Please don't top-post (I've rearranged your post)

I don't know if it's still in print, but look for "Building a 3D Game
Engine in C++" by Brian Hook (Wiley) (ISBN 0-471-12326-9)

$48.95 CDN, $34.95 USA when I bought it in 1995

-Alan
 
I

Ioannis Vranos

john said:
So if I wanted to do some game programming with C++ and openGL/directx do I
need to know MFC /VCL . Can I just know C++ and bypass these extras


If you want to do Windows programming, better learn .NET and not MFC,
Win32 and the other old stuff. MFC was just an object oriented API
encapsulating Win32 API.


..NET is the thing of today, and the latest DirectX (9.0) is a managed
one, that is it is .NET.


The latest Microsoft C++ compiler supporting .NET is 2003 (aka 7.1).


A good book to learn how to use .NET with C++ is


"Visual C++ .NET How To Program" by Deitel.

http://vig.prenhall.com/catalog/academic/product/0,1144,0134373774,00.html


It is very good, it covers even multithreading.



However if you can wait, I suggest you wait for VC++ 2005 and the new
C++/CLI standard.
 
I

Ioannis Vranos

Ioannis said:
However if you can wait, I suggest you wait for VC++ 2005 and the new
C++/CLI standard.

In other words in the mean time, if you can wait, you can read more
standard C++ which can also be used in .NET.
 
I

Ioannis Vranos

john said:
Is this similar to having Visual basic environment, MFC provides this
support


What version of VB are you referring to? Because VB also uses .NET (that
is all languages in Windows have the same API).
 
U

Ufit

john townsley said:
Is this similar to having Visual basic environment, MFC provides this
support

If you want to program under Microsoft environment based apps
learn MFC and Visual C++. VB is good for web programming and
some database stuff. .NET is just coming and nobody knows yet
how good it is gonna be. If you like a monstrous code with thousand
lines of text - use ATL or WTL. IMHO for decent games only C++ environment
is good so far and theres no question about it. OpenGL awaits official
extensions or a new official version OpenGL 2.0. So for right now
C++ and DirectX/3D is the best solution. Besides MFC is very flexible
and as MS judges - you can easily write a 3D game using MFC.
I know many programmers are better off using MFC instead VB
because in fact sometimes the MFC/C++ code is shorter than VB
and of course MUCH faster. That all pertains to Windows environment.
Considering other OSs, you must use clean C/C++ code to achieve
compatibility and portability.
P.S. - programming games is not so easy as it looks - it's really pain in the ass.
That's an art work of many people spending their lives creating something that
lasts a few days of playing. But sells good ))

Uf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top