共用方式為


IVsUIShell.GetDialogOwnerHwnd(IntPtr) Method

Definition

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

public:
 int GetDialogOwnerHwnd([Runtime::InteropServices::Out] IntPtr % phwnd);
public int GetDialogOwnerHwnd (out IntPtr phwnd);
abstract member GetDialogOwnerHwnd : nativeint -> int
Public Function GetDialogOwnerHwnd (ByRef phwnd As IntPtr) As Integer

Parameters

phwnd
IntPtr

nativeint

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

Returns

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.

Applies to