IMessengerWindow::IsClosed property

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

Retrieves a Boolean value that indicates the open or closed state of the window.

This property is read-only.

Syntax

HRESULT get_IsClosed(
  [out, retval] VARIANT_BOOL *pBoolClose
);

Property value

Pointer to a VARIANT_BOOL that defines the open and closed state for the Messenger window with one of the following possible values.

Value Meaning
VARIANT_TRUE
true
Messenger window is closed. This means that it has no HWND or window handle either numerically or on a system level. Attempts to reference some Win32 functions against the window will fail. The client can continue to exist as a running executable and can potentially be seen in process lists and in minimized form in the notification area or system tray.
VARIANT_FALSE
false
Messenger application window is either visible or minimized and has a valid HWND or window handle.

Error codes

Returns one of the following values.

Name Meaning
S_OK
Success.
RPC_X_NULL_REF_POINTER
pBoolClose is a NULL pointer.

Remarks

This method is useful when this interface is called against the Messenger application window. The method can be called against a conversation window, but will return FALSE for any case in which a valid MessengerWindow object existed to call the method against. If the conversation window that corresponds to the object had been closed by client action, then the object would have become unassigned and thrown an object reference error. A minimized window is considered to be closed or not closed based on the visibility settings through Show, Close, or equivalent user interface (UI) settings.

Note

This property is 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 Cmd_W_IsClosed_Click()
    If MsgrWindow.IsClosed = True Then
        MsgBox "Closed"
    Else
        MsgBox "Showed"
    End If
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

See also

IMessengerWindow

Show