[Help]Listview insert column - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: [Help]Listview insert column (/showthread.php?tid=89039) [Help]Listview insert column by DaAniv on 02-08-2009 at 02:11 PM
can you Insert a new column using http://msdn.microsoft.com/en-us/library/bb761101(VS.85).aspx and if yes how? RE: [Help]Listview insert column by matty on 02-08-2009 at 02:26 PM
You need to use the SendMessage API as stated on MSDN.
RE: [Help]Listview insert column by DaAniv on 02-08-2009 at 02:44 PM how do you write it? RE: [Help]Listview insert column by matty on 02-08-2009 at 02:46 PM Try it and post what you come up with and we will go from there. I wont just give you the code you wont learn that way. RE: [Help]Listview insert column by DaAniv on 02-08-2009 at 02:52 PM
I don't really get how to set the LPLVCOLUMN structure code:and this is fine for the sendmessage? RE: [Help]Listview insert column by matty on 02-08-2009 at 03:04 PM
quote:No this will not work at all. The message you are sending through SendMessage is not a string it is an integer. LVM_INSERTCOLUMN is 0x101B. Column index I also believe is zero-based meaning the first column is 0 the second is 1 etc. LPLVCOLUMN you need to allocate memory for and fill the structure yourself. js code:If you have no idea about what I just wrote then read the documentation and study a bit more RE: [Help]Listview insert column by DaAniv on 02-08-2009 at 06:11 PM
JavaScript code:as said in the comments how do I know the cx bytes and offset when I create the structure? RE: [Help]Listview insert column by matty on 02-08-2009 at 09:09 PM
It is found on this page which I already linked to. quote: You need to match up the offset with the specific field you are filling. |