Procedure cmwantspecialkey (var msg: tcmwantspecialkey); message cm_wantspecialkey;
{Note:
Cm_wantspecialkey-tcmwantspecialkey-(cm_base + 30)
Sent by tcontrol in response to cn_keydown and cn_keyup
Intercept special keys such as vk_tab, vk_left, vk_right, vk_up, vk_down, vk_return, vk_execute,
Vk_escape and vk_cancel
The cm_wantspecialkey component provides easier and more flexible judgment than intercepting wm_getdlgcode window messages.
Method to Determine whether certain special keys are required. When the control receives any special key, it sends the cm_wantspe
The cialkey component message is sent to the control.
Example:
Procedure tcustomgrid. cmwantspecialkey (var msg: tcmwantspecialkey );
Begin
Inherited;
If (goediting in options) and (char (msg. charcode) = #13) Then MSG. Result: = 1;
End;
Note:
When processing vk_tab, the effect of pressing the tab key is limited to this control. In other words, the focus is not set to the bottom.
A widget.
Related:
WINDOS message wm_getdlgcode
}
Procedure cmdesignhittest (var msg: tcmdesignhittest); message cm_designhittest;
{Note:
Cm_designhittest-tcmdesignhittest-(cm_base + 28)
Special message never sent from within the VCL (but from a designer DLL), used only
Design Time to determine whether a control wants mouse and key input. Message. Result = 1
If the control behaves like at runtime else 0
To process this message, you can add the scroll bar component to the component and enable it to act during the design period.
You must use the following method to create a scroll bar for your component:
Example:
Tmyscrollbar = Class (tscrollbar)
Procedure cmdesignhittest (VAR message: tcmdesignhittest); message cm_designhittest;
End;
Procedure tmyscrollbar. cmdesignhittest (VAR message: tcmdesignhittest );
Begin
Message. Result: = 1;
End;
You must use the following method to create a scroll bar for your component:
Tmyscrollbar. Create (NiL );
Instead
Tmyscrollbar. Create (Self );
}
Procedure cndrawitem (VAR message: twmdrawitem); message cn_drawitem;
Procedure cnmeasureitem (VAR message: twmmeasureitem); message cn_measureitem;
{Note:
Procedure cndrawitem (VAR message: twmdrawitem); message cn_drawitem;
Procedure cnmeasureitem (VAR message: twmmeasureitem); message cn_measureitem;
The two messages are closely related --
Refer to this document in "Delphi-> application tips-> message events in Delphi-> Windows messages"
Procedure wmmeasureitem (VAR message: twmmeasureitem); message wm_measureitem;
Procedure wmdrawitem (VAR message: twmdrawitem); message wm_drawitem;
Description
Example:
Refer to "" Delphi-> application tips-> draw controls in Delphi-> compile the ownerdraw method in Delphi.
Button method and the implementation code of the Custom button provided in note.
}
Custom message of VCL