IMultiMonitorDockingSite::SetMonitor method

Changes which monitor is used for docked toolbars on a multiple monitor system.

Syntax

HRESULT SetMonitor(
  [in]  IUnknown *punkSrc,
  [in]  HMONITOR hMonNew,
  [out] HMONITOR *phMonOld
);

Parameters

punkSrc [in]

Type: IUnknown*

A pointer to the object implementing the IDockingWindow interface for which the monitor is being altered.

hMonNew [in]

Type: HMONITOR

A handle to the monitor that replaces the existing default monitor.

phMonOld [out]

Type: HMONITOR*

When this function returns, contains a pointer to the previous default monitor's handle.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]