What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] CustomLook Images & Resize

[?] CustomLook Images & Resize
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
O.P. [?] CustomLook Images & Resize
Is there anyway to change an image element inside a Button's CustomLook because the normal method doesn't seem to work. Once I get it to change, I also need to make the image stretch to the size of the button. Is there something I can add in the XML to do this?
<Eljay> "Problems encountered: shit blew up" :zippy:
03-16-2008 08:38 PM
Profile PM Find Quote Report
mynetx
Skinning Contest Winner
*****

Avatar
Microsoft insider

Posts: 1175
Reputation: 33
37 / Male / Flag
Joined: Jul 2007
RE: [?] CustomLook Images & Resize
As for the size, you can always give an absolute image size, and add <Mosaic>ResizeToFit</Mosaic> to it. As for on-the-fly change, this is currently not supported by PlusWnd::ImgElmt_SetImageFile(). Either this cannot be done, or you need to use a Windows API call to achieve the result; I'm not sure about the last one.
mynetx - Microsoft, enhanced.

You have a problem or issue with Windows, Internet
Explorer or Office?
Send a tweet!
03-16-2008 08:43 PM
Profile E-Mail PM Web Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
O.P. RE: [?] CustomLook Images & Resize
I was hoping for an API tbh.

I'm basically making an image that resizes with the window if that helps anybody out. It's inside a button else it wouldn't have a handle and I can't resize it
<Eljay> "Problems encountered: shit blew up" :zippy:
03-16-2008 08:46 PM
Profile PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1622
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: [?] CustomLook Images & Resize
I think you might need to look at usig some GDI+ stuff.  Mattike used some in Log Manager, and I borrowed some of the code for Web2Live.  I think matty also used it in one of his scripts (Screenshot Sender 4?).  You'll also need to look up trusty MSDN for the exact stuff on the button.

Have fun trying to work this out.... :tongue:
[Image: markee.png]
03-16-2008 11:42 PM
Profile PM Find Quote Report
Patchou
Messenger Plus! Creator
*****

Avatar

Posts: 8607
Reputation: 201
43 / Male / Flag
Joined: Apr 2002
RE: [?] CustomLook Images & Resize
what isn't supported?

I need to understand more clearly what you want to do. From my understanding, all you need is a custom look button with a picture element in it with a size declared as being dynamic if the button's size changes when the window is resized. If that does not answer your particular problem, pleaes give more information and I'll tell you if it is, indeed, supported or not :).
[Image: signature2.gif]
03-17-2008 07:21 AM
Profile PM Web Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: [?] CustomLook Images & Resize
quote:
Originally posted by Patchou
what isn't supported?

I need to understand more clearly what you want to do. From my understanding, all you need is a custom look button with a picture element in it with a size declared as being dynamic if the button's size changes when the window is resized. If that does not answer your particular problem, pleaes give more information and I'll tell you if it is, indeed, supported or not :).
From my understanding, he wants to change the image of an ImageElement in a ButtonControl's custom look in runtime.
quote:
Originally posted by markee
I think you might need to look at usig some GDI+ stuff.
I highly doubt that GDI/GDI+ will help you here. In Log Manager and the upcoming Countdown Live 2, I use GDI/GDI+ to make a HBITMAP from a GIF/PNG/... file and pass that to a Win32 API which handles the drawing itself.

When you want to use GDI/GDI+ to draw the button yourself, you'd have to register the owner-draw notification and do the drawing on the parent window yourself. As far as I know, this is a very difficult way to do it and I don't think Plus! even supports it. And in my opinion, there shouldn't be any reason why Plus! should support it.

quote:
Originally posted by markee
I think matty also used it in one of his scripts (Screenshot Sender 4?).
Nope, I stole his code to initialize and quit GDI+ and based my stuff on his. He's the one who does magic with GDI and GDI+. :)


My suggestion: Patchou should give us some control over the CustomLook elements of buttons / radio buttons / check box buttons. The image resizing should then be handled the way it's handled when the window is generated from the interface XML.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
03-17-2008 05:08 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On