RE: sendmessage codes

new topic     » goto parent     » topic index » view thread      » older message » newer message

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C20CFB.4B45DEB0
 charset=iso-8859-1

> -----Original Message-----
> From: George Walters [mailto:gwalters at sc.rr.com]
> Sent: Thursday, 6 June 2002 11:16
> To: EUforum
> Subject: sendmessage codes
> 
> 
> Now that i've found the codes, the returned index for the 
> selected item
> seems to be off by one
> 
>  selected = sendMessage(idList,#188,0,0)
>  item = getItem(idList,selected)
> 
> In the above code 'item' contains the info from the item in 
> the list that is
> 1 (one) before the highlighted item. What is it that I don't 
> understand or
> have done wrong??
> 

The sendMessage() function returns a 0-based index value. That is, the first
item in the list has an index of 0, then 2nd item an index of 1, ... 

What message are you sending in the getItem() function?

Were these calls derived from the win32lib? If so, the getItem() in that
library uses a one-based indexing scheme. So if you directly use the output
from the sendmessage in that getItem() you will always be off by one.
Instead use this...

 selected = sendMessage(idList,#188,0,0)
 item = getItem(idList,selected+1)

---------
Derek.

==================================================================
De informatie opgenomen in dit bericht kan vertrouwelijk zijn en 
is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht 
onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en 
de afzender direct te informeren door het bericht te retourneren. 
==================================================================
The information contained in this message may be confidential 
and is intended to be exclusively for the addressee. Should you 
receive this message unintentionally, please do not use the contents 
herein and notify the sender immediately by return e-mail.


==================================================================

------_=_NextPart_000_01C20CFB.4B45DEB0
Content-Type: application/ms-tnef

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu