Developer

API Reference

IWidget_SetFlags()

Brew Release
Brew MP 1.0.2
See Also
Error Codes IWidget IWidget_GetProperty IWidget_GetFlags IWidget_AddFlags Widget Events
Description
This helper function allows the caller to turn on a set of flags in a widget that will change its behavior. The caller should bitwise OR the flags it wishes to set together and pass the result in the dwFlags parameter.
The set of flags passed to IWidget_SetFlags() relpaces the flags currently set in the widget. That is, IWidget_SetFlags() turns off all flags set in the widget, then turns on the ones specified in the dwFlags parameter.
IWidget_SetFlags() calls IWidget_SetProperty(), setting the PROP_FLAGS property to the set of flags specified in dwFlags. Calling IWidget_SetFlags() 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, more importantly, what set of flags the widget understands, consult the widget's documentation.
For example, the text widget defines the TWF_MULTILINE, TWF_VERTICALNAV and TWF_PASSWORD flags. You can consult the Text Widget documentation for specific details on these flags. To tell a text widget to display text on multiple lines and allow vertical cursor navigation, an application would call:
IWidget_SetFlags(pTextWidget, TWF_MULTILINE|TWF_VERTICALNAV);
Parameters
  • pif
    []:
    [in] Pointer to the IWidget interface object.
  • dwFlags
    []:
    [in] The set of logically ORed flags to enable in the widget.
Interface
Prototype
   int IWidget_SetFlags(IWidget *pif, uint32 dwFlags);
Return
AEE_SUCCESS : The widget was able to handle the event, and the internal flags were set to the set specified.. AEE_EFAILED : The widget was unable to handle the event, and the internal flags were not changed.
Side Effect
Depending on the widget implementation and what flags were set, the widget's behavior will change. Refer to the widget's documentation to see what specific flags it supports and what effect they have.
Comment
If the application wishes to enable specific flags without disabling the current set of internal flags, it should call IWidget_AddFlags() instead.
IWidget_SetFlags(0) can be used to turn all internal widget flags off.
  • Follow