Skip to content

Commit

Permalink
Merged PR 18038: Expanded IInitializeWithWindow guidance
Browse files Browse the repository at this point in the history
Expanded IInitializeWithWindow guidance
  • Loading branch information
mcleanbyron committed Sep 20, 2021
1 parent 8bcd72a commit 604044e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
Expand Up @@ -50,7 +50,7 @@ api_name:

## -description

Specifies an owner window to be used by a Windows Runtime object that is used in a desktop app.
Specifies an owner window to be used by a Windows Runtime (WinRT) object that is used in a desktop app.

## -parameters

Expand All @@ -62,6 +62,12 @@ The handle of the window to be used as the owner window.

If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.

## -remarks

For more information about using this method to specify the owner window for a WinRT object, see <a href="/windows/apps/desktop/modernize/desktop-to-uwp-supported-api#classes-that-use-iinitializewithwindow">Classes that use IInitializeWithWindow</a>.

## -see-also

<a href="/windows/desktop/api/shobjidl_core/nn-shobjidl_core-iinitializewithwindow">IInitializeWithWindow</a>
<a href="/windows/desktop/api/shobjidl_core/nn-shobjidl_core-iinitializewithwindow">IInitializeWithWindow</a>

<a href="/windows/apps/desktop/modernize/desktop-to-uwp-supported-api#classes-that-use-iinitializewithwindow">Classes that use IInitializeWithWindow</a>
Expand Up @@ -50,7 +50,7 @@ api_name:

## -description

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

## -inheritance

Expand All @@ -62,19 +62,22 @@ The <b>IInitializeWithWindow</b> interface inherits from the <a href="/windows/d
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.

<h3><a id="When_to_use"></a><a id="when_to_use"></a><a id="WHEN_TO_USE"></a>When to use</h3>
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.
Use this interface if you will provide an owner window to a WinRT object in a desktop application. For more information about this scenario, see <a href="/windows/apps/desktop/modernize/desktop-to-uwp-supported-api#classes-that-use-iinitializewithwindow">Classes that use IInitializeWithWindow</a>.

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.


<ul>
<li><a href="/uwp/api/Windows.Devices.Enumeration.DevicePicker">Windows.Devices.Enumeration.DevicePicker</a></li>
<li><a href="/uwp/api/Windows.UI.Popups.PopupMenu">Windows.UI.Popups.PopupMenu</a></li>
<li><a href="/uwp/api/Windows.UI.Popups.MessageDialog">Windows.UI.Popups.MessageDialog</a></li>
<li><a href="/uwp/api/windows.graphics.capture.graphicscapturepicker">Windows.Graphics.Capture.GraphicsCapturePicker</a></li>
<li><a href="/uwp/api/Windows.Services.Store.StoreContext">Windows.Services.Store.StoreContext</a></li>
<li><a href="/uwp/api/Windows.Storage.Pickers.FileOpenPicker">Windows.Storage.Pickers.FileOpenPicker</a></li>
<li><a href="/uwp/api/Windows.Storage.Pickers.FileSavePicker">Windows.Storage.Pickers.FileSavePicker</a></li>
<li><a href="/uwp/api/Windows.Storage.Pickers.FolderPicker">Windows.Storage.Pickers.FolderPicker</a></li>
<li><a href="/uwp/api/Windows.UI.Popups.MessageDialog">Windows.UI.Popups.MessageDialog</a></li>
<li><a href="/uwp/api/Windows.UI.Popups.PopupMenu">Windows.UI.Popups.PopupMenu</a></li>
<li><a href="/windows/desktop/shell/dataobject">CLSID_DragDropHelper</a></li>
</ul>

## -see-also

<a href="/windows/apps/desktop/modernize/desktop-to-uwp-supported-api#classes-that-use-iinitializewithwindow">Classes that use IInitializeWithWindow</a>

0 comments on commit 604044e

Please sign in to comment.