Contains routines used to send messages from widgetset classes to the LCL.

lclmessageglue.pas is used to make the passing of messages to the LCL from the different widgetsets easier. Your mileage will vary if you try to use these procedures from within your program.

lclmessageglue.pas is part of the Lazarus Component Library (LCL).

Delivers a message (TLMessage) to the specified component, control or object.

DeliverMessage ensures that the reference count for a TLCLComponent descendant in Target is maintained during message delivery. The reference count is incremented prior to message delivery, and decremented when the operation is completed.

If Target is a TControl descendant, the TLMessage instance is sent to the WindowProc method in the control. For TObject descendants, the message is sent using the Dispatch method in the class instance.

An exception which occurs during message delivery is forwarded to the HandleException method in the Application.

TLMessage Application TApplication.HandleException TLCLComponent TControl.WindowProc TObject.Dispatch
Pointer to the result code from the TLMessage instance. Control or object where the message is delivered. TLMessage instance with the message type constant and result code used in the routine. Creates, configures, and delivers a message to the specified target control.

Calls DeliverMessage to apply or dispatch the message to the target.

TLMessage
Pointer to the integer result code in the message. 0 if the message was accepted, non-zero if the message was rejected. Control where the message is delivered. Message type constant sent in the simple message. Delivers a LM_ACTIVATE message to the specified target control.

Calls DeliverMessage to apply or dispatch the message to the target.

TLMessage
Pointer to the integer result code from the delivered message. 0 indicates the message was accepted. A non-zero value indicates the message was rejected. The Control where the LM_ACTIVATE message is delivered. Indicates if the control should be active. True if the control should be minimized. False if the control is not in the minimized state. Optional handle for the current or newly active window for the control. Default value is 0. Sends a LM_SETFOCUS message to the target control.

Calls SendSimpleMessage to send the message to the target.

Pointer to the Integer result code for the message. 0 indicates the message was accepted. A non-zero value indicates the message was rejected. The control where the message is sent. Sends a LM_KILLFOCUS message to the target control.

Calls SendSimpleMessage to send the message to the target.

Pointer to the Integer result code for the message. 0 indicates the message was accepted. A non-zero value indicates the message was rejected. The control where the message is sent. Delivers a LM_SHOWWINDOW message to the target control.

Calls DeliverMessage to apply or dispatch the message for the target control.

Modified in LCL version 3.0 to use the values in the Show and Status arguments in the message for the target control.
Pointer to the Integer result code for the message. 0 indicates the message was accepted. A non-zero value indicates the message was rejected. Component, control, or class instance where the message is delivered. Contains True if the window is visible, otherwise False. Normally contains zero. A non-zero value if the message was generated when another window was shown or hidden. Delivers a LM_SIZE message to the target control.

The SizeType argument can contain values from the constants defined in the LCLType unit, like:

SIZE_RESTORED (0)
This is the default value.
SIZE_MINIMIZED (1)
The target was minimized.
SIZE_MAXIMIZED (2)
The target was maximized.
SIZE_FULLSCREEN (16)
Non-WINAPI value to support wsFullScreen state.
Size_SourceIsInterface (128)
This flag is automatically added to the argument value when FromInterface is set to True.

Calls DeliverMessage to apply or dispatch the message to the target.

Pointer to the Integer result code for the message. 0 indicates the message was accepted. A non-zero value indicates the message was rejected. Component, control, or class instance where the message is delivered. Contains the new width in pixels for the target. Contains the new height in pixels for the target. True if the message was sent from the widgetset to notify the LCL of a size change. False to make the widgetset change the size of the control. Default value is True. Indicates whether the sizing message originated in the LCL interface. Default value is True. Delivers a LM_MOVE message to the target control. Delivers a LM_MouseMove message to the target control. Delivers a TLMMouse button down message for the specified button to the target control. Delivers a TLMMouse button up message for the specified button to the target control. Delivers a TLMMouseEvent mouse wheel message to the target control. Sends a LM_CAPTURECHANGED message to the target control.

A capture changed message occurs when mouse capture for a control is enabled. Mouse capture indicates that mouse input is redirected to the target control, even when the mouse pointer is not within the bounds for the control.

Sends a LM_SELCHANGE message to the target control. Sends a LM_DESTROY message to the target control. Delivers a LM_CHANGED message to the target control. Sends a LM_CLICKED message to the target control. Sends a CM_MOUSEENTER control message to the target control. Sends a CM_MOUSELEAVE control message to the target control. Sends a LM_SETEDITABLE message to the target control. Sends a LM_MOVEWORD message to the target control. Sends a LM_MOVEPAGE message to the target control. Sends a LM_MOVETOROW message to the target control. Sends a LM_MOVETOCOLUMN message to the target control. Sends a LM_KILLCHAR message to the target control. Sends a LM_KILLWORD message to the target control. Sends a LM_KILLLINE message to the target control. Sends a LM_CUT message to the target control. Sends a LM_COPY message to the target control. Sends a LM_PASTE message to the target control. Sends a LM_CONFIGUREEVENT message to the target control. Delivers a LM_PAINT message to the target control. Delivers a LM_ERASEBKGND message to the target control. Delivers a key down message to the target control. Delivers a key up message to the target control. Delivers a TLMChar message to the target control (and optionally to the application). Applies the specified UTF-8-encoded character to the target control. Modified in LCL version 3.0 to change the AUTF8Char argument to a variable parameter. Delivers a LM_TIMER message to the target control. Sends a LM_EXIT message to the target control. Sends a LM_CLOSEQUERY message to the target control. Sends a LM_DRAGSTART message to the target control. Sends a LM_MONTHCHANGED message to the target control. Sends a LM_YEARCHANGED message to the target control. Sends a LM_DAYCHANGED message to the target control. Delivers a TLMMouse message for multiple button clicks to the target control. Delivers a LM_DRAWLISTITEM message using the specified drawing structure to the target control. Delivers a CBN_DROPDOWN notification message to the target control. Delivers a CBN_CLOSEUP notification message to the target control.