IViewObjectEx::GetViewStatus (Windows Embedded CE 6.0)
1/6/2010
This method returns information about the opacity of the object and what drawing aspects are supported.
Syntax
HRESULT GetViewStatus(
DWORD* pdwStatus
);
Parameters
- pdwStatus
[out] Pointer to the view status. This information is returned as a combination of the VIEWSTATUS enumeration values.
Return Value
If method returns S_OK, the view status was successfully returned. This method should never fail or return an error code.
Remarks
To optimize the drawing process, the container needs to be able to determine whether an object is opaque and has a solid background. It is not necessary to redraw objects that are entirely covered by a completely opaque object. Other operations, such as scrolling, can also be highly optimized if an object is opaque and has a solid background.
The IViewObjectEx::GetViewStatus method returns whether the object is entirely opaque (VIEWSTATUS_OPAQUE bit) and whether its background is solid (VIEWSTATUS_SOLIDBKGND bit).
This information can change in time.
An object can be opaque at a given time and become totally or partially transparent later on, for example, because of a change of the BackStyle property.
An object should notify its sites when it changes using the IAdviseSinkEx::OnViewStatusChange method so the sites can cache this information for high-speed access.
Objects not supporting the IViewObjectEx interface are considered to be always transparent.
The IViewObjectEx::GetViewStatus method also returns a combination of bits indicating which aspects are supported.
If a given drawing aspect is not supported, all IViewObjectEx methods taking a drawing aspect as an input parameter should fail and return E_INVALIDARG.
The IViewObjectEx::GetViewStatus method allows the container to get back information about all drawing aspects in one quick call.
Usually, the set of supported drawing aspects should not change with time. However, if this was not the case, an object should notify its container using IAdviseSinkEx::OnViewStatusChange.
Which drawing aspects are supported is independent of whether the object is opaque, partially transparent, or totally transparent.
In particular, a transparent object that does not support DVASPECT_TRANSPARENT should be drawn correctly during the back-to-front pass using DVASPECT_CONTENT. However, this is likely to result in more flicker.
To determine whether the platform supports this interface, see Determining Supported COM APIs.
Requirements
Header | ocidl.h, ocidl.idl |
Library | ole32.lib, uuid.lib |
Windows Embedded CE | Windows CE 3.0 and later |