Pointers to bitmaps

Discuss OrbForms Designer and PocketC Architect

Postby mgreen on Sun Apr 23, 2006 10:58 pm

I'm starting to work with UIGadgets and I would like to keep a pointer to a bitmap in the object that defines the gadget. Within the @app statement I have:
bitmap leftEar {id = 8000; image8 = "LeftEar.bmp";}
bitmap rightEar {id = 8001; image8 = "RightEar.bmp";}

The structure for the gadget is:
struct earBMP {
UIGadget earGadget; Draw earDraw; bitmap* whichEar;
void onopen(); void onclose();
void ondraw(); void onpendown(); };

I get an error message: "methods cannot have undeclared return type" just before the "bitmap*". I want to pass the dereferenced pointer to the earDraw.bitmap routine. I know I could use an integer and a switch statement if I want to, but the pointer made sense. What am I missing?
Michael Green
Posts: 72
Joined: Fri Mar 14, 2003 9:40 pm
Location: USA

Postby nmc on Mon Apr 24, 2006 6:59 am

In my .orb files, bitmap-defs look like this:

bitmap Bitmap imgItemSelected {
id = 1086
imageres = "remRSC,Tbmp,20"

so you may just have to add the "Bitmap" keyword.
Posts: 197
Joined: Tue May 27, 2003 8:42 pm
Location: Germany

Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 3 guests