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

Pages: (2): « First « 1 [ 2 ] Last »
[?] Clearing LstView Controls
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: RE: [?] Clearing LstView Controls
quote:
Originally posted by SpunkyLoveMuff
quote:
Originally posted by Mattike
Try this instead!

That causes an error and so doesn't work
Uh? Then why does it work flawlessly here? Can you tell me the error please?
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
10-03-2007 05:32 PM
Profile E-Mail PM Web Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
O.P. RE: [?] Clearing LstView Controls
quote:
Originally posted by Mattike
Uh? Then why does it work flawlessly here? Can you tell me the error please?

Object Expected. Spelling mistake in your post... I did edit mine to tell you. It didn't seem to be working anyway, but then again neither did Volv's and that is working now. I think my PC is playing up and I have reset since I last posted.
<Eljay> "Problems encountered: shit blew up" :zippy:
10-03-2007 05:45 PM
Profile PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
29 / Male / Flag
Joined: Nov 2006
Status: Away
RE: [?] Clearing LstView Controls
yo.

code:
PlusWnd.SendControlMessage("controlID", 0x1009 /* LVM_DELETEALLITEMS */, 0, 0);

[quote]
Ultimatess6
: What a noob mod
10-03-2007 07:47 PM
Profile PM Web Find Quote Report
phalanxii
Full Member
***


Posts: 146
Reputation: 5
32 / Male / Flag
Joined: Aug 2006
Status: Away
RE: [?] Clearing LstView Controls
I would lean more towards using Mattike/roflmao456's method of using the LVM_DELETEALLITEMS message.

In my previous experience, doing a loop to remove each item is considerably slower and you can see the list getting cleared one by one.

Using the LVM_DELETEALLITEMS message clears the list altogether, and not only does that look nicer, but it probably uses less memory (considering only 1 line is called compared to the n lines used in a loop).

Just my two cents.
10-04-2007 12:47 AM
Profile PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: [?] Clearing LstView Controls
Yes indeed, the LVM_DELETEALLITEMS is the best, most efficient and fastest way you can get: it's the pure Win32 API! (and we all love that thing don't we?)

I suggest you to try fix my code (make use of that Debug::Trace function!) or try roflmao456's code. The reason why my function uses a call to SendMessage instead of using PlusWnd::SendControlMessage is so that I don't have to pass that whole PlusWnd object to the function, but roflmao's code will do just the same thing and may turn out even more interesting if you only want to use the list cleaning one or two times and you don't really need a separate function for it. :)

This post was edited on 10-04-2007 at 04:57 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
10-04-2007 04:56 PM
Profile E-Mail PM Web Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« 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