----Borland C + + Builder API Backdoor
----Intro
----C + + Builder is worthy of Borland company's excellent products, it is very fast and efficient to develop Windows programs, but in the process of programming you will find some of its limitations, so that you can not achieve their own ideas. For example, you can't change the system menu of the form, for example, you can't find the Starttrack and Endtrack events when you use the tracking bar, but your program needs both. Windows API programming, you will not have these problems, just to deal with Wm_syscommand and Wm_hscroll (or wm_vscroll) messages, you can achieve these functions. The disadvantage of the Windows API is that programming is cumbersome, and too much time is spent on detail, but its functionality is the most powerful. C + + Builder's VCL is only a subset of its functionality, because VCL is encapsulated on the basis of the API, and it discards some features that are not commonly used in encapsulation. But the programmer's imagination is not encapsulated, they are always with greater enthusiasm to achieve the ingenuity of ideas, modify the System menu and add Starttrack and Ndtrack events to the tracking column is just a trick. But VCL does not have these functions, how to do?
----Fortunately, the Borland company did not block the road, but left behind a backdoor-allowing programmers to intercept and process Windows messages themselves, just like API programming. So, the method has ...
----method
----Blocking Windows messages requires the following steps:
----inside a form header file (such as Unit1.h)
----1. Create a message mapping table in the class declaration, handing the processing of a message to a custom message handler function.
Begin_message_map
Message_handler (Windows message name, tmessage, message processing function name)
Message_handler (...)
End_message_map (Tform)
----2. Declare a message handler function within the private area of a class declaration.
Private://User declarations
void __fastcall Message handler function name (Tmessage &message);