> From: Gabriel Covert
>
> Is it possible to access the style attribute of the control
> associated with
> a ControlPtr? A ControlPtr is a pointer to a ControlType, of
> which style is
> a member, so I tried ControlPtrName->style, but this give me a "not a
> struct/union/class" error when compiling... Please help! Thanks!
>
You didn't post your actual code, so I could only guess at what you did
wrong. Here is some sample code that successfully accesses the style member
of a control pointer:
ControlPtr cp;
enum controlStyles cs;
FormPtr frm = FrmGetActiveForm();
cp = FrmGetObjectPtr( frm, FrmGetObjectIndex( frm, MainOkButton ) );
cs = cp->style;
if (cs == buttonCtl)
WinDrawChars("it's a button", 13, 10, 80 );
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/