Search code examples
c#.netvb.netwinapiwndproc

Can a message that was registered using 'RegisterWindowMessage' be unregistered?


Strangely there is no (at least documented) UnregisterWindowMessage function to ensure that no more notifications of that message will be sent and handled between both applications.

Can a message that was registered using RegisterWindowMessage be unregistered or not?


Solution

  • There's no UnregisterWindowMessage and no alternatives like GlobaladdAtom/GlobalDeleteAtom available. To ensure that no more notifications are handled you could register and use a 'HANDLE NOTIFICATIONS OFF/ON' type of message.