Provides an object with the names of its container application and the compound document in which it is embedded.
HRESULT SetHostNames( LPCOLESTR szContainerApp, LPCOLESTR szContainerObj );
Pointer to the name of the container application in which the object is running.
Pointer to the name of the compound document that contains the object. If you do not wish to display the name of the compound document, you can set this parameter to NULL.
This method returns S_OK on success.
The complete window title for an embedded object in an SDI container application or an MDI application with a maximized child window should appear as follows:
<object application name> - <object short type> in <container document>
Otherwise, the title should be:
<object application name> - <container document>
The "object short type" refers to a form of an object's name short enough to be displayed in full in a list box. Because these identifying strings are not stored as part of the persistent state of the object, IOleObject::SetHostNames must be called each time the object loads or runs.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|