Use subclass of methods to realize the response of special messages for VB

xiaoxiao2021-03-06  55

The default form message and control message processing functions of the VB system cannot fully meet our needs, and some messages can not be handled, such as: wm_paint. How can I get these system messages and handle them? Subclass method It shows its power.

Subcale means replacing the message processing function that is submitted to the system when you create a form, and use another new function to temporarily replace it, so you can take over all messages handling tasks that are passed to this function. After you perform your message processing code, you will then turn the control back to the original message processing function.

The API function used here is setWindowlong (), which can complete the above operation.

转载请注明原文地址:https://www.9cbs.com/read-114332.html

New Post(0)