What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » WM_NOTIFY Help - (Noobs stay away! haha)

WM_NOTIFY Help - (Noobs stay away! haha)
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. WM_NOTIFY Help - (Noobs stay away! haha)
Well I have been working on a little project here and it makes use of the Tree View Control. Now since there isn't any built in support for it you have to subclass and receive messages.

Firstly I was using WM_PARENTNOTIFY and the returned value of wParam was WM_LBUTTONDOWN. Now what I need is to be able to use a double click not just a single click. So I did some research and came across website: http://www.codeproject.com/treectrl/treeview.asp.

Now a specific section talks about catching WM_NOTIFY and using the NMHDR structure to get which command :
quote:
NM_CLICK   ; user has clicked the left mouse button within the control
NM_DBLCLK  ; user has Double clicked the left mouse button within the control
NM_RCLICK  ; user has clicked the right mouse button within the control
NM_RDBLCLK ; user has Double clicked the left mouse button within the control

Now this is all fine and dandy however I can understand that I can use SendMessageW with WM_NOTIFY and the defined structure will be filled with the information I need however... This message is supposed to be returned in the OnWindowIdEvent_MessageNotification function. So my dilemma is the website example says that lParam is the NMHDR structure however there would be no way to access the members of the structure.

Any ideas?

As well here is the current function in my script.

code:
function On_editorEvent_MessageNotification(pPlusWnd,     /*        Window Object                */
                                            nMessage,     /*        Window Message Received      */
                                            wParam,       /*        wParam field message         */
                                            lParam)       /*        lParam field message         */
                                            {
    switch (nMessage){
        case WM_PARENTNOTIFY:
            _sent_notify = true;
            Interop.Call('user32', 'SendMessageW', _window.Handle,
                                                   WM_NOTIFY,
                                                   pPlusWnd.GetControlHandle('tvFiles'),
                                                   NMHDR.DataPtr);
            break;
        case WM_NOTIFY:
            _get_item(pPlusWnd);
            if (_sent_notify == true){
                Interop.Call('kernel32', 'RtlMoveMemory', NMHDR, lParam, 12);
                Debug.Trace(NMHDR.ReadDWORD(0));
                _sent_notify = false;
            }
            break;
    }
}

This post was edited on 03-08-2007 at 10:48 PM by matty.
03-08-2007 10:24 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
WM_NOTIFY Help - (Noobs stay away! haha) - by matty on 03-08-2007 at 10:24 PM
RE: WM_NOTIFY Help - (Noobs stay away! haha) - by effection on 03-08-2007 at 10:34 PM
RE: WM_NOTIFY Help - (Noobs stay away! haha) - by deAd on 03-08-2007 at 10:45 PM
RE: WM_NOTIFY Help - (Noobs stay away! haha) - by matty on 03-08-2007 at 10:50 PM
RE: RE: WM_NOTIFY Help - (Noobs stay away! haha) - by deAd on 03-08-2007 at 10:53 PM
RE: WM_NOTIFY Help - (Noobs stay away! haha) - by CookieRevised on 03-09-2007 at 12:55 AM
RE: WM_NOTIFY Help - (Noobs stay away! haha) - by Patchou on 03-09-2007 at 06:29 AM
RE: RE: WM_NOTIFY Help - (Noobs stay away! haha) - by CookieRevised on 03-09-2007 at 10:45 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