To make things easier for cosing in Win32 API, MFC is created which wraps Win32 API in classes.
At the beginning i though MFC is there only to aid you making C/C++ GUI Application.
For example, CSocket() wraps the function socket(), printf() gets wrapped in another class, and so on. Why in MFC everything is wrapped into a class even though some parts don't really need to be wrapped, such as socket(), send(), etc.
I think MFC should only wrap GUI API for Windows, since the GUI part requires alot of coding such as keeping a track of messages loop & make sure about the which button is clicked, etc. So in my opinion, winsock API should not be wrapped, e.g. when a user clicks "connect" button, we should use connect() - the main API, not the wrapped one because this wouldn't really effect the user! CSocket() will do exact same thing socket() does. Thus, CSocket() will slower than socket().
Let me explain more, when you want to print a data to static box, you can't use printf(), you need to use a special CStatic class that prints out the text to a static text box. This makes sense, but creating a socket, just happens behind the seen, we do not create a socket and show it on screen! so we do not need a wrapper for it as the wrapper won't do anything new, it just wraps socket() inside CSocket(). Eventually, they both do samething, CSocket() might be slower too.
After all, i think we just need a wrapper that makes objects (Windows Forms) & handle them, such as CStatic. The rest should be coded as it is.
1. Any suggestions? am i right or wrong? why?
2. Can MFC be used with Delphi, C#, etc just like Win API? or Its been made for C++ specifically?
I hope you are getting my point. I apologize for making my explanation long, i'm just trying to reach you what goes in my mind. Please answer me in an easy fashion if you don't mind. I already have enough confusion