ADC Home > Reference Library > Technical Q&As > Carbon > Human Interface Toolbox >

Setting a UserPane's feature


Q: I am building a custom UserPane control for my dialog. But when I do a GetControlFeatures with the control handle, I get a return value of 64, which means that the control only supports Get/Set Control Data. What’s happening?

A: Functions like tracking and idling need to be enabled by setting the Control Features Bits that specify which appearance compliant messages are supported for that user pane. You can find the definition of the control feature bits in the <Controls.h> interface file.


kControlSupportsGhosting     = 1 << 0,

kControlSupportsEmbedding    = 1 << 1,

kControlSupportsFocus        = 1 << 2,

kControlWantsIdle            = 1 << 3,

kControlWantsActivate        = 1 << 4,

kControlHandlesTracking      = 1 << 5,

kControlSupportsDataAccess   = 1 << 6,

kControlHasSpecialBackground = 1 << 7,

kControlGetsFocusOnClick     = 1 << 8,

kControlSupportsCalcBestRect = 1 << 9,

kControlSupportsLiveFeedback = 1 << 10

When using a UserPane control in a 'DITL', the Control Feature Bits are set by the initial value of that user item’s 'CNTL' resource definition. For example, if you wanted to support tracking and idle in your UserPane handler, you would enable the kControlHandlesTracking and kControlWantsIdle bits by setting the initial value of the UserPane's 'CNTL' resource definition to 0x0028.


[Sep 27 1999]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.