-- DiVe MaSTa's  LB_GETTEXT help...

Ok, I've had a MILLION people ask me about this mess in the past couple of
days. GETTEXT isnt
really all that difficult, but it's not like most API
commands/calls/functions, in SOME aspects.

Ok First for this lesson, you will need to understand the following commands:

String$( )
The Constant for LB_GETTEXT and LB_GETTEXTLENGTH

Ok first of all you need to find the AOL Main window...which we have gone
thru in each lesson, it's handle is"AOL Frame25". Use FindWindow.

Next, pick the window you want to use LB_GETTEXT in...some Listboxes and
Combo Boxes GPF
If you use LB_GETTEXT wrong in them though. I warned you!

Ok get the handle of the window you wanna gettext from...

Provide a set amount of characters to store the string u gettext into...
we'll say 200...say syntax is:

Dive = String$(200, 0)

Ok Now you have your string, so you wanna get the length of your window, this
is where ,
LB_GETTEXTLENGTH comes into the picture.OK lets say we're gonna get the mail
that
you have in your new mailbox, we'll have to create a FOR NEXT Loop. So lets
get the mail
handle...

Mail% = FindChildByClass(MDI, "New Mail")

Ok now, create the loop, by counting the mail in _AOL_Tree. Use LB_GETCOUNT
for this.

' Add the For part of the loop here...

Ok Now get the length of each mail subject...

Lngth% = SendMessage(MailhWnd, LB_GETTEXTLENGTH, For varibale, Dive)

Ok, now that you have the length of the mails..you're gonna need to get the
text from each subject
and place it into a string, which we have already defined as Dive.

GtTxt% = SendMessageByString(TreehWnd, LB_GETTEXT, For variable, Dive)

Now we have the selected subject in the Dive string, so do whatever you want
with it.
We're going to add it to List1.

List1.Additem Dive

Ok, No add in your Next variable, to end the FOR NEXT Loop, and you have
added the new mailbox
to your List1. Are'nt you proud of yourself ? :)


--  Using LB_GETTEXT the correct and GPF-Less way, written by DiVe MaSTa. 
