What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Help]Listview insert column

[Help]Listview insert column
Author: Message:
DaAniv
Junior Member
**


Posts: 19
30 / Male / Flag
Joined: Jan 2009
O.P. RE: [Help]Listview insert column
Javascript code:
function InserColumn(hWnd,iCol,Header)
{
    //Message constants
    var LVM_INSERTCOLUMN = 0x101B;
    var LVCF_TEXT = 0x4;
    var LVCF_WIDTH = 0x2;
       
    var cx= Interop.Allocate(4)//How do I know how much bytes I need?
    cx.WriteWord(0, 50)
 
    var  pszText=Interop.Allocate((Header.length+2)*2)
    pszText.WriteString(0, Header,true)
    //Create an LVCOLUMN structure
    var LVCOLUMN = Interop.Allocate(32);
    LVCOLUMN.WriteDWord(0,  LVCF_WIDTH); //How do I know the offset?
    LVCOLUMN.WriteDWord(6, cx.DataPtr);  //How do I know the offset?
    LVCOLUMN.WriteDWord(16, LVCF_TEXT); //How do I know the offset?
    LVCOLUMN.WriteDWord(22, pszText.DataPtr); //How do I know the offset?
   
 
    var Result = Interop.Call("user32", "SendMessageW", hWnd, LVM_INSERTCOLUMN, iCol, LVCOLUMN);
   
    //Clear the DataBlocs
    cx.Size = 0;
    pszText.size=0;
    LVCOLUMN.Size = 0
   
    //Return the result
    return Result;
}

as said in the comments how do I know the cx bytes and offset when I create the structure?
02-08-2009 06:11 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Help]Listview insert column - by DaAniv on 02-08-2009 at 02:11 PM
RE: [Help]Listview insert column - by matty on 02-08-2009 at 02:26 PM
RE: [Help]Listview insert column - by DaAniv on 02-08-2009 at 02:44 PM
RE: [Help]Listview insert column - by matty on 02-08-2009 at 02:46 PM
RE: [Help]Listview insert column - by DaAniv on 02-08-2009 at 02:52 PM
RE: [Help]Listview insert column - by matty on 02-08-2009 at 03:04 PM
RE: [Help]Listview insert column - by DaAniv on 02-08-2009 at 06:11 PM
RE: [Help]Listview insert column - by matty on 02-08-2009 at 09:09 PM


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