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
声明
Function GetDialogOwnerHwnd ( _
<OutAttribute> ByRef phwnd As IntPtr _
) As Integer
用法
Dim instance As IVsUIShell
Dim phwnd As IntPtr
Dim returnValue As Integer
returnValue = instance.GetDialogOwnerHwnd(phwnd)
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.