Messages in Delphi xe7

Source: Internet
Author: User

In Delphi xe7 program development, the message mechanism ensures inter-process communication.

In the program, the message comes from:

1) system: notifies your program users of input, painting, and other system-wide events;

2) Your program: communication information between different program parts.


When to use messages?

When you write a program, you usually use events instead of messages. The control triggers events for you to process, while the internal control processes the events through the message mechanism (transparent to you ), to achieve communication with other controls and process system information.

No matter what, sometimes you do need to use messages.

  • Your program must respond to events not defined by a system or framework (or events not exposed)
  • You have created a control that needs to communicate with other programs.
  • Create a multi-threaded program and use messages for communication between different threads

How do I select a message solution?

When you use a rad Studio development project, you can use two message processor systems, depending on the framework of your program:

  • The firemonkey program must use a cross-platform message processing mechanism, using RTL;
  • The VCL program depends on the Message Processing Mechanism of Windows API.

When you write a control by yourself, you may need to decide the message mechanism based on the platform you are using, whether to use FMX or VCL. In either case, VCL uses the Windows message mechanism, just as the existing VCL control sends and receives messages through the windows API, in addition, the VCL framework does not replace the message translation of Windows APIs with the FMX cross-platform mechanism.




  1. Delphi xe7 supports the cross-platform Message Processing Mechanism RTL;
  2. When developing a native VCL program, you need to use Windows API messages.

Messages in Delphi xe7

Contact Us

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: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.