Prev Previous Post   Next Post Next
Old 18th December 2003, 04:59   #6
justin
Moderator Alumni
 
Join Date: Apr 2000
Location: USA
Posts: 315
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
justin is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump