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);
- pif:[in] Pointer to the IWidget interface object.
- pdwFlags:[out] Pointer to a uint32 that will be set to the logically ORed set of flags that are turned on in the widget.
int IWidget_GetFlags(IWidget *pif, uint32 *pdwFlags);