IVsUIShell.GetDialogOwnerHwnd Method (IntPtr)

 

Returns the HWND that can be used to parent modal dialogs.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

abstract GetDialogOwnerHwnd : 
        phwnd:nativeint byref -> int

Parameters

phwnd
Type: System.IntPtr

[out] Pointer to a window handle that can be used to parent modal dialogs.

Return Value

Type: System.Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

From vsshell.idl:

HRESULT IVsUIShell::GetDialogOwnerHwnd(
   [out] HWND * phwnd
);

This method returns the handle of the environment's main application window unless another modal dialog box is already open. In this case, the HWND of the top-most modal dialog is returned.

Return to top
Show: