Skip to content

Latest commit

 

History

History
99 lines (73 loc) · 3.71 KB

nf-oleidl-ioleobject-sethostnames.md

File metadata and controls

99 lines (73 loc) · 3.71 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:oleidl.IOleObject.SetHostNames
IOleObject::SetHostNames (oleidl.h)
Provides an object with the names of its container application and the compound document in which it is embedded.
IOleObject interface [COM]
SetHostNames method
IOleObject.SetHostNames
IOleObject::SetHostNames
SetHostNames
SetHostNames method [COM]
SetHostNames method [COM]
IOleObject interface
_ole_ioleobject_sethostnames
com.ioleobject_sethostnames
oleidl/IOleObject::SetHostNames
com\ioleobject_sethostnames.htm
com
38cccb3d-e198-4996-991b-6c56451d25e3
12/05/2018
IOleObject interface [COM],SetHostNames method, IOleObject.SetHostNames, IOleObject::SetHostNames, SetHostNames, SetHostNames method [COM], SetHostNames method [COM],IOleObject interface, _ole_ioleobject_sethostnames, com.ioleobject_sethostnames, oleidl/IOleObject::SetHostNames
oleidl.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
OleIdl.Idl
Windows
19H1
IOleObject::SetHostNames
oleidl/IOleObject::SetHostNames
c++
APIRef
kbSyntax
COM
OleIdl.h
IOleObject.SetHostNames

IOleObject::SetHostNames

-description

Provides an object with the names of its container application and the compound document in which it is embedded.

-parameters

-param szContainerApp [in]

Pointer to the name of the container application in which the object is running.

-param szContainerObj [in]

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.

-returns

This method returns S_OK on success.

-remarks

Notes for Callers

Call IOleObject::SetHostNames only for embedded objects, because for linked objects, the link source provides its own separate editing window and title bar information.

Notes to Implementers

An object's application of IOleObject::SetHostNames should include whatever modifications to its user interface may be appropriate to an object's embedded state. Such modifications typically will include adding and removing menu commands and altering the text displayed in the title bar of the editing window.

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.

-see-also

IOleObject

IOleObject::GetUserType