Do I need a reason to like the same thing? No! Do you hate a reason? I think, you should.
"I hate MFC! "I once said this to one of my colleagues. He said," You are qualified to hate MFC because it will affect the speed of MFC under wince ". it seems quite reasonable to hear it, but it is a lie to think about it.
Does MFC affect the speed? This sentence may be correct if it was placed two years ago, because the CPU speed of the embedded device at that time was indeed not fast. But what about now? The speed is at least MHz. How much efficiency does MFC affect? What's more, I am not doing industrial-level control, but application-level products. Even with the speed of C #, I am totally acceptable-of course, I still won't use C # To write code, although the speed is acceptable to me, it is added to run C # code. I cannot accept the volume expansion of the OS caused by the simplified class library of. net. The OS is only 9 MB and one is added. net streamlined framework should at least make it bloated 3 M!
There is always a reason to hate it. I 'd better recall when it makes me feel helpless.
A year ago, I wrote a calculator and needed two interfaces: Common and scientific. the interface is different, but the calculation process is the same. therefore, I want to use the same message processing function, that is, the same dialog box. CPP file. however, in MFC, I cannot find any method to assign my ideas to practice. instead, I had to recreate a CPP file and copy the original processing code-> paste.
Six months later, the product planned not to use explorer, but to build its own UI. It was just found that after the explorer was removed, a very simple, default generated Dialog Box program would have an error! It cannot be imagined why, in wince, MFC needs explorer to work normally! But I had to use the SDK to write the UI.
Two months ago, I wanted to experiment with an extremely boring and abnormal idea, that is, to let the program exit the program by calling postquitmessage () n times. in the generated program architecture, I did not find the familiar translatemessage (). however, I had to pick up the API again.
So now, writing code is a habit of not touching MFC, because I cannot implement it in MFC for fear of any strange ideas.
Another point is that the automatically generated code in MFC is really hard to understand, but it just keeps it in my program ---- uncomfortable!
To put it bluntly, the reason why I hate MFC is really too simple. I just cannot drive native MFC because of my lack of ability. But can this really be the reason why I hate MFC?
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.