> At 5:39 AM +0100 24-01-00, Mike Davis wrote:
> >1) I am having a little problem with
> >UIColorSetTableEntry(UIFormFill, &MyRGBColor). I have a function
> >that I call that will change the formFill color. When I call the
> >function before I execute FrmDrawForm, in my frmOpenEvent, my
> >application crashes.
>
> That shouldn't happen. I'd love to see the stack trace...
>
> Ah, I see. It's because there is no DrawWindow defined before FrmDrawForm
> is called, and UIColorSetTableEntry uses WinRGBToIndex. In early (beta)
> releases of OS 3.5, WinRGBToIndex required that a DrawWindow be defined.
> In the final OS 3.5 release, this restriction is lifted and WinRGBToIndex
> uses the screen color table if the draw window is currently undefined.
> So, get the latest ROMs!
I just downloaded (today) the most recent color debug ROMs. I have
the same problem. When I try to use this function prior to my
opening form, I get bus error. I did not download the full SDK
today. I am still using the SDK I downloaded about 10 days ago.
If I place it after the initial FrmDrawForm(), it opens with the
default color. Only after going to another form and returning, does
the form color take effect.
This is very simple test code:
// in my Main handler, I have
case frmOpenEvent:
SetFormColor(void) // just for test. If here 'bus error'
FrmDrawForm(form); // Draw form before drawing lines
// if SetFormColor here, ok but opens
// with default color.
// This is just a simple test function, to see how to use these
// color table functions. formColor is declared globally
void SetFormColor(void) {
formColor.index = UIColorGetTableEntryIndex(UIFormFill);
formColor.r = 230;
formColor.g = 230;
formColor.b = 255;
UIColorSetTableEntry(UIFormFill, &formColor);
}
> >3) When I try functions that use UIColorTableEntryType, I get an
> >undefined 'type' error. I have PalmOs.h included. Where is that
> >type declared? I can't find it in the header files.
>
> You must be using an old set of header files. UIColorTableEntryType is
> private to PalmOS, and does not appear in any public headers. If your
> UIColor.h uses it, then you have an old UIColor.h!
Downloaded the latest one today.
--
-----------------------------------------------------------------
Discussion Group: http://www.halcyon.com/ipscone/wwwboard/
Protect your constitutional rights. Your favorite one may be next!
-----------------------------------------------------------------
---
For information on using the Palm Developer Forums, or to unsubscribe, please see
<http://www.palm.com/devzone/mailinglists.html>.