tags:

views:

113

answers:

1

Simple question I think, after I have registered a few system-wide hotkeys with RegisterHotKey() do I need to eventually call UnregisterHotKey() to clean them up, or can I simply exit my application without worrying about it?

MSDN doesn't seem to say, that or I misunderstand it, anyways: I realize I should just go ahead and call UnregisterHotKey to be safe, but if anyone knows otherwise it'd be useful just to know, for knowings sake.

Thanks!

+2  A: 

If the MSDN doesn't explicitly tell you to unregister, then it's probably safe to just quit. The MSDN is usually pretty good at pointing things like this out. However, I also use RegisterHotKey and I always make sure to call UnRegisterHotKey when my application quits as you never know if not doing do will cause you problems in a future version of Windows. Better to be safe than sorry IMHO.

Rob