IWidget_GetFlags() calls IWidget_GetProperty() to retrieve the PROP_FLAGS property. Calling IWidget_GetFlags() on a widget that doesn't support PROP_FLAGS will result in an error. To determine if a specific type of widget supports PROP_FLAGS and what set of flags the widget understands, consult the widget's documentation.
For example, the Text Widget defines and understands the TWF_MULTILINE, TWF_VERTICALNAV and TWF_PASSWORD flags. Each of these causes a text widget to behave differently. To determine if a specific flag is set, an application would call:
The application can bitwise AND the result to determine which flags are set and which behavior the text widget currently exhibits:
bTextIsMultiline = (dwFlags&TWF_MULTILINE); bVerticalNavAllowed = (dwFlags&TWF_VERTICALNAV); bInPasswordMode = (dwFlags&TWF_PASSWORD);
int IWidget_GetFlags(IWidget *pif, uint32 *pdwFlags);
- AEE_SUCCESS : The widget was able to handle the event, and the set of
enabled flags was returned.
AEE_EFAILED : The widget was unable to handle the event, and nothing
valid was returned.