>I'm new to the palm developer forum and to Palm development.  This is a
>pretty basic question as a result.  I'm trying to get the index of a form
>bitmap object.  The reference guide says if I've got the same bitmap in two
>different form bitmap objects on the same form, I won't be able to use
>FrmGetObjectIndex().

Right.  Because form bitmap objects don't have IDs of their own.  A form
bitmap object is literally nothing more than coordinates, a bitmap resource
id, and a "usable" attribute.  There's nothing more to them than that.


>Unfortunately, I can't see any way to get the index of the form bitmap
>object other than hard-coding it into the program.  Is there a better way
>to do this?

Well, you could loop from zero to FrmGetNumberOfObjects()-1, calling
FrmGetObjectType() to see if the object at that index is a frmBitmapObj,
and if it is then call FrmGetObjectId() to see what the id of its bitmap
resource is, and/or call FrmGetObjectBounds() to get the position, and thus
determine if it is the one you wanted to do something with.

-David Fedor
Palm Developer Support



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to