IMessengerWindow::Width property

[Width is no longer available for use as of Windows Vista. See Windows Messenger for more information.]

Sets or retrieves the horizontal dimension of a Messenger window, in pixels.

This property is read/write.

Syntax

HRESULT put_Width(
  [in]          LONG lWidth
);

HRESULT get_Width(
  [out, retval] LONG *plWidth
);

Property value

Error codes

Returns one of the following values.

Name Meaning
S_OK
Success.
RPC_X_NULL_REF_POINTER
plWidth is a NULL pointer.
E_INVALIDARG
Attempted to set window to zero or negative width.
E_FAIL
Could not get window handle.
E_NOTIMPL
Cannot be accessed through scripting.

Remarks

The following table lists error codes returned by this method.

Error Code Meaning
0x80004005 Could not get window handle.

If the Messenger window is closed (only available from the taskbar), not responding, or if the HWND could not be found, this method will fail.

Note

This property is not available for scripting languages.

Examples

The following Visual Basic example shows the use of this method.

Public WithEvents MsgrUIA As MessengerAPI.Messenger
Public MsgrWindow As MessengerAPI.IMessengerWindow

Private Sub Form_Load()
    Text_Top.Text = CStr(MsgrWindow.Top)
    Text_Height.Text = CStr(MsgrWindow.Height)
    Text_Left.Text = CStr(MsgrWindow.Left)
    Text_Width.Text = CStr(MsgrWindow.Width)
End Sub

Requirements

End of client support
Windows XP
End of server support
Windows Server 2003
Header
Msgrua.h
IDL
Msgrua.idl
DLL
Msgsc.dll