Wtl has two sides, indeed. It is not as powerful as the MFC interface (GUI) class library, but can generate very small executable files. If you use MFC for interface programming like me, you will feel that the interface control provided by MFC is very comfortable to encapsulate and use, not to mention the built-in Message Processing Mechanism of MFC. Of course, if you don't want your program to increase the size of several hundred kb simply by using the MFC framework, wtl is your choice. Of course, we also need to overcome some obstacles:
- The ATL template class looks a little weird at the beginning
- No wizard-like support, so you need to manually process all message mappings.
- Msdn does not support official documentation. You need to collect relevant documents everywhere, or even view the source code of wtl.
- No reference books available
- No official support from Microsoft
- The windows of ATL/wtl are very different from those of MFC. Not all the knowledge about MFC you know is applicable to wtl.
On the other hand, wtl also has its own advantages:
- You do not need to learn or master complex document/view frameworks.
- It has basic interface features of MFC, such as automatic update of DDX/DDV and command status (the translator adds: check mark and enable mark of menus ).
- Enhanced some MFC features (such as easier-to-use window separation ).
- You can generate a smaller executable file than the static-linked MFC Program (all source code of wtl is statically linked to your program ).
- You can fix errors (bugs) in your own wtl without affecting other applications (in contrast, if you fix a bug in the dynamic library of MFC/CRT, other applications may crash.
- If you still need to use MFC, the windows of MFC and the windows of ATL/wtl can "coexist peacefully ". (For example, a prototype in my work uses the cframewnd of MFC and contains the csplitterwindow of wtl, and uses the cdialogs of mfc in the csplitterwindow. I didn't want to show off anything, only the MFC code is modified so that the wtl split window can be used, which is much better than the MFC split window ).