Shoutbox

Keep contacts shown on desktop visible when Aero Peeking - 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: WLM Plus! General (/forumdisplay.php?fid=23)
+----- Thread: Keep contacts shown on desktop visible when Aero Peeking (/showthread.php?tid=91687)

Keep contacts shown on desktop visible when Aero Peeking by tb87 on 07-29-2009 at 04:08 AM

Hi,

I have a suggestion. I'm using Windows 7 with the Aero Peek function (think it's also available in Vista though). When I do the Aero Peek contacts setup to appear on desktop also get hidden. Would it be possible to keep them visible? It would be a really great feature allowing us to simply hit Windows+Space keys to quickly see who's connected.

I found some hints on how to do it, don't know though if it's gonna help you.

http://www.neowin.net/forum/index.php?showtopic=794078)

Thanks,

Alex


RE: Keep contacts shown on desktop visible when Aero Peeking by tb87 on 07-31-2009 at 12:57 PM

eh-hem.. Anyone?

Is it because not a lot of people know about Aero Peek? In fact it's a function that allows you to temporarily see the desktop and (hopefully :) docked content WITHOUT having to minimize all those windows you have open by pressing WIN+SPACE key combination.

I use Outlook task/appointment gadgets this way : no need to popup outlook anymore to see what's in it. Wouldn't it be wonderful to have the same functionality with msgplus?? :)


RE: Keep contacts shown on desktop visible when Aero Peeking by NanaFreak on 07-31-2009 at 01:28 PM

gadgets react differently to normal windows, they will always hide instead of how gadgets stay... to make the floating contacts stay on the desktop would be too much of a hassle and having to hook into other things than messenger to make it work...

so, I doubt Patchou will implement this into Messenger Plus! Live.


RE: Keep contacts shown on desktop visible when Aero Peeking by Eljay on 07-31-2009 at 01:51 PM

Actually, it's simple to implement :P

DwmSetWindowAttribute called with DWMWA_EXCLUDED_FROM_PEEK can make any window show through peek, could easily be done with a script as well until Patchou implements it. But I'm too lazy to make one and don't even use desktop contacts 8-)


RE: Keep contacts shown on desktop visible when Aero Peeking by tb87 on 07-31-2009 at 10:53 PM

Ahh Eljay you're making my day guy :)

Didn't take a look at msgplus's scripting feature yet. I however have a past of scripting/programming so shouldn't be an impossible task to me.

Your thoughts on how much time/work this would take?

Of course I'd be willing to share the script here ! :)

Alex


RE: Keep contacts shown on desktop visible when Aero Peeking by tb87 on 08-02-2009 at 08:28 PM

Here's some working code :

code:
function OnEvent_SigninReady(Email)
{

    var handle = null;
    handle = Messenger.ContactListWndHandle;
     Interop.Call("User32.dll", "EnumChildWindows", handle, Interop.GetCallbackPtr("EnumCallback"), 0);

}

function EnumCallback(hWnd, lParam)
{
    var DWMWA_EXCLUDED_FROM_PEEK = 12;
    var three = 3;
    Interop.Call("dwmapi.dll", "DwmSetWindowAttribute", hWnd, DWMWA_EXCLUDED_FROM_PEEK, three.DataPtr, 4) ;
     return true;
}



However, for some obscure reason EnumChildWindows returns EVERY window visible on the desktop. So each window visible when you sign in will be applied the EXCLUDED_FROM_PEEK attribute. This doesn't bother me as only Outlook is started at the same time WLM starts (on Windows start) but if someone knows what's going on it would be good :)

Alex
RE: Keep contacts shown on desktop visible when Aero Peeking by Eljay on 08-02-2009 at 08:50 PM

It's fairly easy to check if they are actually floating contact windows seeing as you already have the window handles. Within the callback loop you can simply call GetClassName and GetWindowText. Floating contacts have a class name of "#32770" (Windows standard dialog class) and a title of "Float".

The problem is detecting when these windows are created, your method of checking during the SigninReady event should be fine for existing desktop contacts but if you add any more contacts to your desktop they won't be affected by it until you next sign in, and I don't think you can detect when these windows are created (maybe you can with subclassing).

It would be much easier if Patchou implemented this into Plus! :P


RE: Keep contacts shown on desktop visible when Aero Peeking by tb87 on 08-03-2009 at 10:09 AM

Humm.. Well the fact that the code's working is enough for me. It isn't neat/efficient/bug free but as this was my first JScript code I'll be happy and live with it, and I have no time to implement additional features.

For the API, kindly note that it is EnumChildWindows - rather than EnumWindows - that is called. It should therefore return windows created by WLM, not every window on the desktop.

Nonetheless I still find it's a very useful feature to Aero Peek the contact list! :D

Thanks for your help,

Alex


RE: Keep contacts shown on desktop visible when Aero Peeking by Spunky on 08-03-2009 at 11:04 AM

quote:
Originally posted by tb87
For the API, kindly note that it is EnumChildWindows - rather than EnumWindows - that is called. It should therefore return windows created by WLM, not every window on the desktop.

If WLM is minimized to the tray during signin, Messenger.ContactListHandle will return 0, meaning EnumChildWindows will enumerate all windows that are children of the desktop ;)
RE: Keep contacts shown on desktop visible when Aero Peeking by tb87 on 08-03-2009 at 11:58 AM

Ahhh... useful information! :)

This is why I don't want to make bug-free apps : you find an exception, then have to implement a feature. I'll leave that stuff to Patchou !

Thanx though for the post.

Alex


RE: Keep contacts shown on desktop visible when Aero Peeking by tb87 on 08-04-2009 at 01:22 AM

Hey Spunky,

I tested my script with the WLM window *not* minimizing on startup and now docked contacts disappear when Aero Peeking. Any hint on what would cause that?

Thanks again,

Alex


RE: Keep contacts shown on desktop visible when Aero Peeking by Jeffrey89 on 08-29-2009 at 09:11 AM

On a related note: would it be possible to have a better way to see if someone's online?

I'm using a laptop, the contacts on the desktop are at the right side of the screen. But sometimes it is difficult for me to see whether the icon is green or gray.

I would suggest different icons, or a 1 or 2 px border indicating the status (similar to the border around display images in the latest WLM).


RE: Keep contacts shown on desktop visible when Aero Peeking by tb87 on 08-29-2009 at 03:09 PM

I've solved that problem : look in the options, there's a way of making the icons dim (or even get hidden) when the person's offline.


RE: RE: Keep contacts shown on desktop visible when Aero Peeking by Jeffrey89 on 08-31-2009 at 07:37 AM

quote:
Originally posted by tb87
I've solved that problem : look in the options, there's a way of making the icons dim (or even get hidden) when the person's offline.

Thanks!

I always looked in the Display Settings by right-clicking on the contact label, I didn't realize there was such an option in the Plus! Configuration window :$