IInitializeWithWindow interface (shobjidl_core.h)

Exposes a method through which a client can provide an owner window to a Windows Runtime object used in a desktop application.


The IInitializeWithWindow interface inherits from the IUnknown interface. IInitializeWithWindow also has these types of members:


The IInitializeWithWindow interface has these methods.

Method Description
IInitializeWithWindow::Initialize Specifies an owner window to be used by a Windows Runtime object that is used in a desktop app.


When to implement

Implement this interface if your object needs to be provided with an owner window, generally to display UI. Most third-party applications will not need to implement this interface.

When to use

Use this interface if you will provide a window to an object. A common scenario in which this interface is used is a Windows Store desktop browser.

This interface is implemented by the following objects. Note that this is necessarily an incomplete list; refer to an individual object's documentation to determine whether that object implements this interface.


Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)