The application should pass the set of flags to be disabled as a logically OR'ed set in the 'dwFlagsToRemove' parameter. This will cause the flags to be switched off internally, leaving the other flags untouched in their prior state.
This helper function retrieves the set of flags that are enabled in the current widget using IWidget_GetFlags(), strips out the set of flags to be disabled, then uses IWidget_SetFlags() to turn them off while leaving the others switched on. If the widget doesn't support the PROP_FLAGS parameter, an error code will be returned. To determine if a specific type of widget supports PROP_FLAGS and what flags can be set, refer to that 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 tell a multiline text widget to no longer allow vertical navigation, an application may call
This is equivalent to the following, which disables vertical navigation but retains the multiline behavior:
IWidget_GetFlags(pTextWidget, &dwCurFlags); dwCurFlags &= ~TWF_VERTICALNAV; IWidget_SetFlags(pTextWidget, dwCurFlags);
int IWidget_RemoveFlags(IWidget *pif, uint32 dwFlagsToRemove);
- AEE_SUCCESS : The widget was able to handle the event, and only the
specified flags were disabled.
AEE_EFAILED : The widget was unable to handle the event, and the widget's
flags remain unchanged
- Depending on the widget implementation and what flags were unset, the widget's behavior will change. Refer to the widget's documentation to see what specific flags it supports and what effect they have.