What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Release] @ScriptDev

[Release] @ScriptDev
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Release] @ScriptDev
code:
var WM_USER = 0x0400;
var HK_GETKEY = (WM_USER+2);
var HK_SETKEY = (WM_USER+1);

function OnEvent_Initalize(bMessengerStart){
    WndSubclass = MsgPlus.CreateWnd('myWindow.xml', 'myWindow', 2 /* Used to not activate the window */);
    WndSubclass.RegisterMessageNotification(WM_HOTKEY); /* Register the hotkey message */
   
    var lRet = Interop.Call('user32', 'RegisterHotKey', WndSubclass, 0x001, hibyte(dHotKey), lobyte(dHotKey));
}

function OnWndSubclassEvent_MessageNotification(pPlusWnd, nMessage, wParam, lParam){
    switch(nMessage){
        case WM_HOTKEY:
            //Do whatever   
            break;
    }
}

function lobyte(w){ return w & 0xff; }
function hibyte(w){ return w >> 8; }

This is the basics, now when you are setting the hotkey to the HotkeyControl you use HK_SetKey and to get the key you use HK_GetKey along with SendMessageW.

This post was edited on 11-19-2006 at 08:46 PM by matty.
11-19-2006 08:46 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Release] @ScriptDev - by phalanxii on 11-17-2006 at 11:01 PM
RE: [Release] @ScriptDev - by Huhu_Manix on 11-18-2006 at 12:27 AM
RE: [Release] @ScriptDev - by Felu on 11-18-2006 at 03:30 AM
RE: [Release] @ScriptDev - by deAd on 11-18-2006 at 03:37 AM
RE: [Release] @ScriptDev - by Matti on 11-18-2006 at 09:45 AM
RE: [Release] @ScriptDev - by phalanxii on 11-18-2006 at 09:52 AM
RE: RE: [Release] @ScriptDev - by Matti on 11-18-2006 at 10:23 AM
RE: [Release] @ScriptDev - by Dempsey on 11-18-2006 at 10:56 AM
RE: [Release] @ScriptDev - by Felu on 11-18-2006 at 11:00 AM
RE: [Release] @ScriptDev - by Dempsey on 11-18-2006 at 11:02 AM
RE: [Release] @ScriptDev - by deAd on 11-18-2006 at 03:12 PM
RE: [Release] @ScriptDev - by matty on 11-19-2006 at 08:46 PM
RE: [Release] @ScriptDev - by NanaFreak on 11-20-2006 at 08:57 AM
RE: [Release] @ScriptDev - by phalanxii on 11-20-2006 at 09:44 AM
RE: [Release] @ScriptDev - by Dempsey on 11-20-2006 at 09:56 AM


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