Shoutbox

Loading the skin options window from a custom button? - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Skinning (/forumdisplay.php?fid=41)
+----- Thread: Loading the skin options window from a custom button? (/showthread.php?tid=80032)

Loading the skin options window from a custom button? by Keikonium on 12-14-2007 at 01:58 AM

Is it possible to load the skin options from a skin in a custom button? If so, what ID would I need to ping (sorry, I don't know the correct terminology for this stuff >.<) to get it to load the window that shows the skin options?

Thanks :).


RE: Loading the skin options window from a custom button? by deAd on 12-14-2007 at 03:05 AM

I'm not sure this will work, but try setting the CmdId property of your button to 7460.


RE: RE: Loading the skin options window from a custom button? by Keikonium on 12-14-2007 at 03:07 AM

quote:
Originally posted by deAd
I'm not sure this will work, but try setting the CmdId property of your button to 7460.

Yes! That works perfectly :). Thanks deAd.

Just for the future, how did you manage to get that number?
RE: RE: RE: Loading the skin options window from a custom button? by vikke on 12-14-2007 at 02:51 PM

quote:
Originally posted by Keikonium
quote:
Originally posted by deAd
I'm not sure this will work, but try setting the CmdId property of your button to 7460.

Yes! That works perfectly :). Thanks deAd.

Just for the future, how did you manage to get that number?
Use Winspector (google it to download it for free), and apply the message hook onto the contact list window. Then click the "open-skins-options" button/menu-item, and see the WM_COMMAND message's wParam (which isCmdId) appear in Winspector.
RE: Loading the skin options window from a custom button? by Matti on 12-14-2007 at 03:28 PM

Or, if you have Spy++ (bundled with Visual Studio), you can log the WM_COMMAND messages sent to the Messenger window. ;)

Other possibly interesting commands which I detected this way:

code:
7455 - Open Plus!' scripts preferences
7406 - Open Plus!' preferences

RE: Loading the skin options window from a custom button? by vikke on 12-14-2007 at 03:31 PM

That's basically the same thing except for Winspector is free, does the same thing (and with a lot more features!). You should be able to find CmdId's for any button in the toolbar.


RE: Loading the skin options window from a custom button? by deAd on 12-14-2007 at 09:11 PM

And Winspector doesn't hang the system when you run it with a debugger also running.


RE: Loading the skin options window from a custom button? by stuartbennett on 12-21-2007 at 08:24 AM

im trying to create a skin options button i have successfully done so but theres a few problems, my code for the button in the 923 defiunitions file is

quote:
<Button cmdid=7460 AccRole=57 Class="TransparentButton" Layout=flowlayout(0,2,0,2) Active=MouseandKeyboard|NoSyncFocus Padding=rect(5,4,5,4)>
<element class="ToolbarIcon" ID=Atom(ai208)/>
</Button>


it creates the button but it has the same image as the smsbutton, but atleast it works, the problems are i want to use a custom image for this buttons icon and dont know how to do it, also i cannot make the button optional as i need something like

{quote}
<Button cmdid=7460 id=atom(skinops) AccRole=57 Class="TransparentButton" Layout=flowlayout(0,2,0,2) Active=MouseandKeyboard|NoSyncFocus Padding=rect(5,4,5,4)>
<element class="ToolbarIcon" ID=Atom(ai208)/>
</Button>


and would declare my plusking round the "id=atom(skinops)" block, of course if i actually try to do that i get a skin trace file and while messenger will load when you double click the icon in the system tray messenger wont load, id probably still be able to receive inbound conversations but could never access the contact list to ever start them.

could somebody please advise me on how i solve this problem please?
RE: RE: Loading the skin options window from a custom button? by davidpolitis on 12-21-2007 at 09:58 AM

Try this:

923 Style:

code:
button[id=atom(SkinOpsbtn)]
{
AccName:rcstr(String ID); //Name
accdesc:rcstr(String ID); //Tooltip
}

923 Definition:
code:
<Button cmdid=7460 id=atom(SkinOpsbtn) AccRole=57 Class="TransparentButton" Layout=flowlayout(0,2,0,2)  Active=MouseandKeyboard|NoSyncFocus Padding=rect(5,4,5,4)>
<element class="ToolbarIcon" content=rcimg(New Image ID)/>
</Button>

RE: Loading the skin options window from a custom button? by vikke on 12-21-2007 at 10:21 AM

If you don't want to mess with the stylesheet, you can include everything in the <Button> tag.

code:
<Button cmdid=7460 id=atom(SkinOpsbtn) AccName="Name Here" accdesc="Tooltip here" AccRole=57 Class="TransparentButton" Layout=flowlayout(0,2,0,2)  Active=MouseandKeyboard|NoSyncFocus Padding=rect(5,4,5,4)>
<element class="ToolbarIcon" content=rcimg(New Image ID)/>
</Button>

RE: RE: Loading the skin options window from a custom button? by davidpolitis on 12-21-2007 at 10:33 AM

quote:
Originally posted by vikke
If you don't want to mess with the stylesheet, you can include everything in the <Button> tag.
If he's not already including it, he might aswell as :P
RE: Loading the skin options window from a custom button? by stuartbennett on 12-21-2007 at 10:42 AM

ok thanks guys, one minor question how do i add additional strings id, i know you add string tags to skininfo.xml to do it but they need custom ids for new string what the number range for those?


RE: RE: Loading the skin options window from a custom button? by davidpolitis on 12-21-2007 at 11:29 AM

quote:
Originally posted by stuartbennett
ok thanks guys, one minor question how do i add additional strings id, i know you add string tags to skininfo.xml to do it but they need custom ids for new string what the number range for those?
New strings cannot be made...
RE: Loading the skin options window from a custom button? by stuartbennett on 12-21-2007 at 11:30 AM

button[id=atom(SkinOpsbtn)]
{
AccName:rcstr(String ID); //Name
accdesc:rcstr(String ID); //Tooltip
}

so what do i set my string ids to then?


RE: Loading the skin options window from a custom button? by aNILEator on 12-21-2007 at 11:33 AM

Just use the same method as consolidated windows use


RE: RE: Loading the skin options window from a custom button? by davidpolitis on 12-21-2007 at 11:38 AM

quote:
Originally posted by stuartbennett
so what do i set my string ids to then?
Only close string in 8.5:
code:
80 //Settings