IVsUIShell::CenterDialogOnWindow Method (IntPtr, IntPtr)
Visual Studio 2015
Centers the provided dialog box HWND on the parent HWND (if provided), or on the main IDE window.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Parameters
- hwndDialog
-
Type:
System::IntPtr
[in] Specifies HWND dialog.
- hwndParent
-
Type:
System::IntPtr
[in] Specifies HWND parent.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From vsshell.idl:
HRESULT IVsUIShell::CenterDialogOnWindow( [in] HWND hwndDialog, [in] HWND hwndParent );
If the IDE is in SDI mode, the dialog box HWND will be centered on the monitor workspace.
Show: