| Previous | Next |
| ERROR_CLIPBOARD_NOT_OPEN | ERROR_WINDOW_NOT_DIALOG |
ERROR_HOTKEY_NOT_REGISTERED
The hot key is not registered
UnregisterHotKey releases a hot key previously registered by the calling thread. The pair of window association and identifier is part of registration bookkeeping; the key combination alone is not the removal handle.
A common bug is unregistering after the owning window has changed, using a different ID from the one passed to RegisterHotKey, or executing cleanup twice. Thread-associated hot keys use a NULL hWnd, which must be mirrored when unregistering.
What to check
- Store the registration ID and associated
HWNDor NULL as one record. - Mark successful registration explicitly; do not infer it from configuration intent.
- Make shutdown cleanup idempotent so the same registration is not removed twice.
- When a window is recreated, unregister the old binding and register against the new lifetime deliberately.
The opposite condition, ERROR_HOTKEY_ALREADY_REGISTERED, is a collision while claiming a key combination.
References
Looking for a different code? Search another status or error code.