Returns the miscellaneous status flags for the run-time object.
HRESULT GetRuntimeMiscStatusFlags (
DWORD*dwMiscFlags
);
Parameter
dwMiscFlags
[out] Pointer to the miscellaneous status flags. The flags are values of the OLEMISC enumeration and have the following meanings:
Flag | Meaning |
OLEMISC_ACTSLIKEBUTTON | The container is prepared to act like a button. Typically used by containers that provide Default and Cancel buttons. |
OLEMISC_ACTSLIKELABEL | ActiveX objects can change the container's preset label. |
OLEMISC_ALIGNABLE | The container supports aligned controls. |
OLEMISC_ALWAYSRUN | The object should be put into the run state even if it is not visible. Not normally used by in-process servers, including ActiveX designers. |
OLEMISC_IMEMODE | The object understands IME mode. Used only by double-byte character set (DBCS) applications. |
OLEMISC_INVISIBLEATRUNTIME | The object is visible only at design time. Used by ActiveX designer objects that do not present a visual interface at run time. |
OLEMISC_NOUIACTIVATE | The object does not support user interface activation. |
OLEMISC_SETCLIENTSITEFIRST | The object requires site information from IOleControl::SetClientSite immediately after creation, rather than after a call to IPersistStorage::Load or IPersistStorage::InitNew. |
OLEMISC_SIMPLEFRAME | The object supports the ISimpleFrameSite protocol. |
Return Values
The designer returns one of the following values:
Return Value | Meaning |
S_OK | The method succeeded. |
E_FAIL | The method failed for an unknown reason. |
E_NOTIMPL | The design-time and run-time objects are the same. |
Comments
The designer implements this method.
ActiveX designers should return all the miscellaneous status flags that appear in the registry for the run-time object. Only OLEMISC_INVISIBLEATRUNTIME and OLEMISC_SETCLIENTSITEFIRST apply to designers.
For more information on the status flags, see the COM Programmer's Reference in the Platform Software Development Kit (SDK).
Example
The following example stores the flag values in the constant RUNTIME_MISCSTATUS
and simply returns its value to the caller:
STDMETHODIMP CMyDesigner::GetRuntimeMiscStatusFlags
(
DWORD *pdwMiscStatus
)
{
CHECK_POINTER(pdwMiscStatus);
*pdwMiscStatus = RUNTIME_MISCSTATUS;
return S_OK;
}