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