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

[?] TVN_BEGINLABELEDIT handling
Author: Message:
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
O.P. [?] TVN_BEGINLABELEDIT handling
Hi,

I've got a 'simple' question.

TVN_BEGINLABELEDIT is sent in the form of a WM_NOTIFY message, the last one pointing to an NMHDR structure. In the documentation, they talk about the lParam being a pointer to an NMTVDISPINFO structure. There is no documentation on where to find that specific pointer. I don't think I'll find it in the NMHDR, and the idCtrl part of WM_NOTIFY isn't an NMHDR-pointer either.

Does anyone know where that pointer to NMTVDISPINFO is?

Thanks in advance.
01-31-2009 06:54 PM
Profile PM Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
RE: [?] TVN_BEGINLABELEDIT handling
quote:
Originally posted by SmokingCookie
they talk about the lParam being a pointer to an NMTVDISPINFO structure
That's it, just use the lParam as though it's a pointer to a NMTVDISPINFO structue :)

I hope I won't confuse you - NMTVDISPINFO is essentially a "substructure" (as "subclass" in OOP sense) of NMHDR

This post was edited on 01-31-2009 at 07:24 PM by Mnjul.
01-31-2009 07:23 PM
Profile PM Web Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
O.P. RE: [?] TVN_BEGINLABELEDIT handling
What do you mean??

Docs say that there's an NMHDR structure in lParam..? (or do I need glasses?)
01-31-2009 07:29 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [?] TVN_BEGINLABELEDIT handling
The pointer to NMTVDISPINFO is the same as the pointer to TV_DISPINFO.

What you need to do is use RtlMoveMemory to copy the lParam memory to another location that is of adequate size.

js code:
function OnWindowEvent_MessageNotification(pPlusWnd, nMessage, wParam, lParam) {
        if (nMessage === WM_NOTIFY) {
                /*
                    NMHDR : 12
                    TVITEM : 40
                */
                var NMTVDISPINFO = Interop.Allocate(52);
                Interop.Call('kernel32', 'RtlMoveMemory', NMTVDISPINFO, lParam, 52);
        }
}

This post was edited on 01-31-2009 at 07:46 PM by matty.
01-31-2009 07:45 PM
Profile E-Mail PM Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
O.P. RE: [?] TVN_BEGINLABELEDIT handling
I see. This "NMTVDISPINFO" contains NMHDR and TVITEM, so I have access to both structures using RtlMoveMemory, right?

(Please correct me of I'm wrong)
01-31-2009 07:53 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [?] TVN_BEGINLABELEDIT handling
no because NMTVDSPINFO is made up of both NMHDR and TVITEM therefore it is one structure 52 bytes in size. You access each by using ReadDWORD or ReadWORD. The NMHDR structure is from 0-8 and the TVITEM is fro 12-18.
01-31-2009 09:33 PM
Profile E-Mail PM Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
O.P. RE: [?] TVN_BEGINLABELEDIT handling
Well, I got it working, thanks :D
01-31-2009 10:14 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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