quote:
Originally posted by Juzzi
Hey,
Is there any way I can add a custom sound from my plugin? I've got a nice idea
yes, because all you need to do is to make the nessecairy changes in the registry. No Messenger Plus! API or whatever is needed for this, simply pure programming and setting some stuff in the registry.
-----
The soundfile itself (named like #xxxxxxxxxxxx.dat) is in normal circumstances placed in
C:\Documents and Settings\All Users\Application Data\Messenger Plus!\Custom Sounds\ (this directory can be different in rare occasions; and I'm not talking about the differences between OS version though).
The filename is also the Sound ID (the "xxxxxxxxxxxx" part). This Sound ID is to be placed in
HKEY_CURRENT_USER\Software\Patchou\MsgPlus2\Nobody\CustSounds as a subkey if you don't have private sound libraries
[*].
This subkey holds primarly 3 important values
Category,
Flags and
Name. See
CookieRevised's reply to .plp Files for more info on these.
(Update: Since Messenger Plus! 3.60 there is an extra registry value named
Language)
[*] Take in account the advanced messenger Plus! registry key
CustomSoundsPrivate.
-----
Personal note: If you implement something like this, please do it in the totally correct way or don't do it at all.
It is certainly not recommended to do this manually if you're not knowing exactly all the "ins", "outs" and "rules" of those registry settings. Patchou and also your plugin users wouldn't be happy if you screw something up by not implementing it correctly. Hence I don't know for sure if I should've posted all this; although much of the info _is_ available and all you need to do is bring things together and also do some seriously testing.