Very few people know how to use RegisterWindowMessage. However this function is a real gem that would let you define a new window message that is guaranteed to be unique throughout the system.
The message value can be used when sending or posting messages.
Syntax
NewMessageID = RegisterWindowMessage("TheMessageToBeRegistered")
Example
You can use it to stop the nasty Windows notification popup when a CD or DVD is inserted in the tray.
NewMessageID = RegisterWindowMessageA("QueryCancelAutoplay")
...
SELECT CASE wMsg
CASE WM_QUERYCANCELAUTOPLAY '// Monitor DeviceNotification.
FUNCTION = 1 '// Stop the notification popup
EXIT FUNCTION