Quote:
Originally posted by Niver
Thanks, It works!
But I still have a problem. I call the IPC_GEN_HOTKEYS_ADD after the winamp window is shown, since I'm not sure I can know at which moment the hotkey plugin is loaded: If I call the IPC_GEN_HOTKEYS_ADD at the init() of my plugin it doesn't work (my plugin is probably loaded after the hotkey plugin).
So the user opens the preferences window, adds a hotkey for the actions I added to the hotkeys plugin. When Winamp is closed then reopened, the settings for these added actions are not restored, probably because when your plugin is initialized it doesn't know anything yet about the new actions...
What can I do? What is the precise moment (some WM_* message or some IPC_* message I could intercept) where I would have to register my hotkeys that would be _after_ the hotkeys plugin init, but _before_ the hotkeys settings loading?
|
You should defer sending that message by PostMessaging() a window with a message, and when that message gets received, that means the message pump is running and it's safe.
-Justin