HookUserMessage Function

Hooks a user message.

void HookUserMessage(UserMsg msg_id, MsgHook hook, bool intercept, function void(UserMsg msg_id, bool sent) post)

Parameters

UserMsg msg_id

Message index.

MsgHook hook

Function to use as a hook.

bool intercept

If intercept is true, message will be fully intercepted, allowing the user to block the message. Otherwise, the hook is normal and ignores the return value.

function void(UserMsg msg_id, bool sent) post

Notification function.

Errors

Invalid message index.