Window.registerMessageReceiver

Function/Meaning
Register/Unregister message receiver function
Type
Method of Window class
Syntax
registerMessageReceiver(mode, func, userdata)
Arguments
mode Specifies whether to register or unregister.
Specifying wrmRegister performs registration. Specifying wrmUnregister performs unregistration.
Constants starting with wrm are defined in tp_stub.h.
func Specifies the message receiver function.
The message receiver function must be in the form bool __stdcall func(void *userdata, tTVPWindowMessage *Message), and its function pointer must be cast to an integer type when passed to this method.
The tTVPWindowMessage structure is defined in tp_stub.h.
If this function returns true, the KiriKiri core will no longer handle that window message.
userdata Specifies the data pointer to be passed to the userdata argument of the receiver function specified by the func argument.
When passing to this method, the pointer must be cast to an integer type.
This argument is ignored when the mode argument is not wrmRegister.
Return Value
None (void)
Description
This method is intended to be used from plugins written in C++ or similar. It cannot be used correctly from TJS2.
This method allows you to register a message receiver function to trap messages passing through this window. In the message receiver function, in addition to normal window messages, two important messages, TVP_WM_DETACH and TVP_WM_ATTACH, can also be trapped. These can be used for purposes such as detaching child windows when the window is reconstructed or destroyed.
A brief explanation of usage can be found in src/plugins/win32/wmrdump in the KiriKiri source distribution package.
Reference
Window.HWND