|
-
May 30th, 2005, 02:35 AM
#1
What does afx in MFC stand for??
Hello Everyone,
I would like to know what does "afx" in MFC stand for and what is its significance.
Thanks in Advance.
Regards,
Ashwin
-
May 30th, 2005, 02:43 AM
#2
Re: What does afx in MFC stand for??
 Originally Posted by AshwinRao
Hello Everyone,
I would like to know what does "afx" in MFC stand for and what is its significance.
Thanks in Advance.
Regards,
Ashwin
ActiveX
AfX
DirectX
and so on .....
Afx really means Application Framework , X is a fancy character added like other microsoft innovations directX,ActiveX..
You can see this X plays a important role to draw attention not only in microsoft... in other area too..
sample
XXX
Xtreme Programming
you can add more..
Last edited by santoct2002; May 30th, 2005 at 02:47 AM.
-
May 30th, 2005, 02:46 AM
#3
Re: What does afx in MFC stand for??
 Originally Posted by AshwinRao
I would like to know what does "afx" in MFC stand for and what is its significance.
The first version of MFC has started being developed in 1989 by a group at Microsoft known as the application framework technology development goup - known as the AFX group.
According to a widespread belief, AFX stands for "Application Framework eXtension". According to George Sheperd and Scot Wingo, however, the legend goes like this: "AF" didn't sound so great by itself, to they added "X" to get a three-letter acronym. The X doesn't really mean anything.
It's significance? Well, you will encounter Afx as a prefix for some functions and constants in MFC. It's significance is purely historical - it shows us how they called the framework internally, before it shipped under the name MFC 1.0 in 1992.
-
May 30th, 2005, 04:06 AM
#4
Re: What does afx in MFC stand for??
-
May 30th, 2005, 04:31 AM
#5
Re: What does afx in MFC stand for??
Afx really means Application Framework
But Why Afx is prefixed with global functions and constants? e.g. AfxMessageBox() .
Life is what u make it and u can make it more simple..........and woderful.
Rate is what give and it give me pleasure.
-
May 30th, 2005, 05:17 AM
#6
Re: What does afx in MFC stand for??
 Originally Posted by upashu2
But Why Afx is prefixed with global functions and constants? e.g. AfxMessageBox()
At that time, namespaces were not yet part of the C++ standard. They needed a way to generally distinguish MFC globals from symbols in the SDK API - hence the prefix.
-
May 30th, 2005, 08:17 AM
#7
Re: What does afx in MFC stand for??
so if I get this, if I want to create a pure MFC application I better use AfxMessageBox then the normal MessageBox?
-
May 30th, 2005, 02:37 PM
#8
Re: What does afx in MFC stand for??
 Originally Posted by da_cobra
so if I get this, if I want to create a pure MFC application I better use AfxMessageBox then the normal MessageBox?
It depends:- ::MessageBox() requires the window handle of the parent window. And since it's a C function, there are no default parameters, so you always have to pass all five parameters.
- With CWnd::MessageBox(), you already don't need the parent HWND parameter. Besides that, the second and third parameter (caption and type) have default values, so you can call it passing only the text.
- AfxMessageBox() is the global MFC version - it doesn't need the parent window either (it will always use the app's main window). And since it's also a C++ function, it has default parameter values like CWnd::MessageBox().
So back to your question: It is not "better" to use AfxMessageBox(), it's only simpler, since you need to specify less arguments. Generally, there's nothing wrong with calling any Win32 API function from MFC code - but calling the MFC counterparts is usually easier.
-
May 31st, 2005, 01:00 AM
#9
Re: What does afx in MFC stand for??
One other advantage of using 'AfxMessageBox()' that comes ins handy especialliy while dealing with multi-language resources is the ability of passing in a string table ID which will automatically be loaded...
-
May 31st, 2005, 07:41 PM
#10
Re: What does afx in MFC stand for??
 Originally Posted by Andreas Masur
One other advantage of using 'AfxMessageBox()' that comes ins handy especialliy while dealing with multi-language resources is the ability of passing in a string table ID which will automatically be loaded...
Good point...
-
June 1st, 2005, 02:57 AM
#11
Re: What does afx in MFC stand for??
 Originally Posted by da_cobra
so if I get this, if I want to create a pure MFC application I better use AfxMessageBox then the normal MessageBox?
I for one never understand this kind of statement. What does it mean to write a pure MFC application and why do people worry about that kind of thing.
AfxMessageBox eventually just calls ::MessageBox.
Am I the only one who has replaced all the CString wrappers for this kind of thing with std::string?
Wakeup in the morning and kick the day in the teeth!! Or something like that.
"i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."
-
June 1st, 2005, 03:12 AM
#12
Re: What does afx in MFC stand for??
Hi Soul, nice to see you again...
 Originally Posted by souldog
Am I the only one who has replaced all the CString wrappers for this kind of thing with std::string?
Probably yes. I only know people who did it the other way round (that is, porting CString to a non MFC / non Windows environment)...
-
June 1st, 2005, 03:38 AM
#13
Re: What does afx in MFC stand for??
 Originally Posted by gstercken
Hi Soul, nice to see you again...
Probably yes.  I only know people who did it the other way round (that is, porting CString to a non MFC / non Windows environment)...
Nice to see you to.
Just seems to me that since I already have a portable string class in std
it is much easier to write the handful of global functions related to resource loading and window text. Plus it just made me feel pretty nifty.
It is just a question of taste however.
Wakeup in the morning and kick the day in the teeth!! Or something like that.
"i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|