Поделиться через


IVsUIShell.GetDialogOwnerHwnd Method

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)

Syntax

'Declaration
Function GetDialogOwnerHwnd ( _
    <OutAttribute> ByRef phwnd As IntPtr _
) As Integer
int GetDialogOwnerHwnd(
    out IntPtr phwnd
)
int GetDialogOwnerHwnd(
    [OutAttribute] IntPtr% phwnd
)
abstract GetDialogOwnerHwnd : 
        phwnd:IntPtr byref -> int 
function GetDialogOwnerHwnd(
    phwnd : IntPtr
) : 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.

Remarks

COM Signature

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.

.NET Framework Security

See Also

Reference

IVsUIShell Interface

Microsoft.VisualStudio.Shell.Interop Namespace