JVCL Help:RegisterWndProcHook@TControl@TJvControlHook@TJvHookOrder

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Summary

Registers a hook.

run\JvWndProcHook.pas


Pascal

 run\JvWndProcHook.pas
 functionRegisterWndProcHook(AControl: TControl; Hook: TJvControlHook; constOrder: TJvHookOrder): Boolean; overload;
functionRegisterWndProcHook(AHandle: THandle; Hook: TJvControlHook; constOrder: TJvHookOrder): Boolean; overload;


Parameters

Parameters Description
AControl: TControl Specifies the control to hook.
Hook: TJvControlHook Specifies the control hook procedure.
const Order: TJvHookOrder Specifies whether to receive messages before or after the control handles them.
AHandle: THandle Specifies the handle to hook.

run\JvWndProcHook.pas


Description

Call RegisterWndProcHook to hook a control. Hooking a control allows you to respond to messages send to that control.
Use Order to specify whether you want to receive messages send to the hooked control, before or after the control handles them. By setting Order to hoBeforeMsg you can prevent the control to handle specific messages.
TJvWindowHook calls this method when it wants to start hooking the control. An internal list is maintained to prevent "broken links" when a hook is removed.
Call UnRegisterWndProcHook to unregister the hook.

run\JvWndProcHook.pas


See Also

UnRegisterWndProcHook

run\JvWndProcHook.pas


About

Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page