What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » A few questions.

A few questions.
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: A few questions.
quote:
Originally posted by Emblem
Is it possible to draw on the Chat window? (Using GDI+ or something.)
I'm afraid that's going to be a nasty one. I think you can retrieve the device context of the window and I think you can then draw on it, but the problem is that windows are very complex objects and drawing on them using low-level GDI will most certainly cause trouble. You're going to need to find a way to redraw your additions every time the chat window needs repainting and even if you manage to do that, it'll probably be over-painted by the controls in the window.

I've seen some scripts trying to draw stuff on chat windows, but none of them managed to do this perfectly in all possible situations. Those scripts used a PlusWnd which is set as child window of the chat window and then positioned. Afterwards, they can reposition it in case the chat window is resized.

The first problem is that this repositioning has to be invoked using a timer, the script can't register an event for when the chat window is resized so it has to do this every x seconds which can cause flickering while resizing.

However the biggest problem is that it's not skin-proof. Every Messenger skin looks different and most of them have their elements in other positions than the default skin. Positioning the child window requires specific client coordinates and thus if it looks fine in one skin, it probably won't in another skin.
quote:
Is there any way to display a right click menu? (Anywhere, not just on a Plus! Window.)
Sure, you can use CreatePopupMenu, populate it with menu items and then show it using TrackPopupMenu. I needed this functionality for one of my own scripts, so I made a nice wrapper class for it (see attachment). Just create a new Menu instance, use AddMenuItem() to add items and use Open() to pop it up somewhere on the screen.

This Menu class is taken straight from the current beta of Screenshot Sender 5, documentation is in the script file itself. If you need to add images in front of the menu items, you're going to have to import the function GdiCreateHBITMAPFromFile() and its dependencies from Countdown Live 2 or Screenshot Sender 5.
quote:
Is it possible to find out what font settings the currently signed in user is using?
I think they're somewhere in the registry, try searching these forums.

.txt File Attachment: __menu.js.txt (26.08 KB)
This file has been downloaded 218 time(s).
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

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

Messages In This Thread
A few questions. - by Emblem on 05-02-2010 at 03:29 AM
RE: A few questions. - by Matti on 05-02-2010 at 08:33 AM
RE: A few questions. - by CookieRevised on 05-03-2010 at 11:00 AM
RE: RE: A few questions. - by Matti on 05-03-2010 at 04:02 PM
RE: A few questions. - by CookieRevised on 05-04-2010 at 05:05 PM
RE: A few questions. - by Matti on 05-04-2010 at 06:15 PM
RE: A few questions. - by CookieRevised on 05-04-2010 at 06:32 PM
RE: A few questions. - by Eljay on 05-04-2010 at 06:51 PM
RE: A few questions. - by CookieRevised on 05-04-2010 at 07:01 PM
RE: A few questions. - by Eljay on 05-04-2010 at 07:47 PM
RE: A few questions. - by CookieRevised on 05-04-2010 at 08:03 PM
RE: RE: A few questions. - by TheSteve on 05-05-2010 at 07:29 AM
RE: A few questions. - by Eljay on 05-04-2010 at 10:14 PM
RE: A few questions. - by CookieRevised on 05-04-2010 at 11:27 PM
RE: A few questions. - by Eljay on 05-05-2010 at 08:41 AM
RE: A few questions. - by Mnjul on 05-05-2010 at 08:50 AM
RE: A few questions. - by CookieRevised on 05-06-2010 at 01:04 AM
RE: A few questions. - by Mnjul on 05-06-2010 at 06:49 AM
RE: A few questions. - by Eljay on 05-06-2010 at 07:25 AM
RE: A few questions. - by Emblem on 05-17-2010 at 05:07 PM


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