Window.registerMessageReceiver

Function/Meaning

[Windows +] Register / delete message reception function

Type
Windowclassmethod of
Syntax
registerMessageReceiver(mode, func, userdata)
Arguments
mode

Specify whether to register or unregister.
If you specify wrmRegister, it will be registered.
If wrmUnregister is specified, the registration will be deleted.
Constants starting with wrm are defined in tp_stub.h.

func

Specifies the message receiving function.
The message receiving function must be in the form bool _stdcall func (void * userdata, tTVPWindowMessage * Message), and the function pointer must be cast to an integer when passed to this method.
The structure tTVPWindowMessage is defined in tp
stub.h.
If this function returns true, Kirikiri itself will not be aware of the window message.

userdata

Specifies the data pointer to pass to the userdata argument of the receiving function specified by the func argument.
When passing to this method, the pointer must be cast to an integer type.
This argument is ignored if the mode argument is not his wrmRegister.

Return value
None (void)
Explanation

This method is supposed to be used by plugins written in C ++ etc.
It cannot be used normally from TJS2.
This method allows you to register a message receiving function to trap messages that pass through this window.
In addition to normal window messages, the message receiving function can also trap two important messages, TVPWMDETACH and TVPWMATTACH, which can be used to remove child windows when the window is rebuilt or destroyed. ..
His src / plugins / win32 / wmrdump in the Kirikiri source distribution package has a brief usage description.

Reference
Window.HWND