Originally posted by pixio:
[b] Yeah, yeah.
Like CWindow::GetWindowText() or
CWindow::CheckRadioButton( int nIDFirstButton, int nIDLastButton, int nIDCheckButton );
nIDFirstButton? Are we talking about OOP or not?
This is not a real abstraciton!. Is just hiding the handle, and implementing all the Win32 API in monhotlitic classes. Even the name of the methods are the same than those on Win32 API!
I agree with rts:
“MFC is a terrible example of C++ usage”
In my experience, you cannot succed in mastering MFC if you don’t have previous experience with the old-plain Win32 API.
Period.
[/b]
That might not be a huge abstraction, but it is an abstraction. You are using those functions on the current object that you call them from, and don’t need to know that the window is actually represented by a handle underneath.
You seem to be ignoring the abstraction of the CDialog class. You don’t need to know that there is a procedure underneath. Dialogs are one area that MFC is great with, IMO.
Personally, I like that it is so close to the actual API calls. If you look at something further abstracted, like OWL, you lose a lot of control you might otherwise have with MFC.
Sure, knowing the Win32 API will help your MFC skills greatly, but it is not a requirement. I personally learned MFC first, and then later picked up Win32. It gave me greater insight into MFC so that I coudl use it more efficiently, but it certainly wasn’t something I NEEDED to know first.
It’s all a matter of opinion. I use MFC for windowed apps that I have no intention to port, don’t require blazingly fast performance, and need to have dialogs and menu options . I use Win32 for things that I want to be faster, aren’t as reliant on dialogs, and I don’t care about portablilty. I use glut for writing quick little apps that I want to be able to run under both Win32 and Linux.