IShellWindows interface
Provides access to the collection of open Shell windows.
Members
The IShellWindows interface inherits from the IDispatch interface. IShellWindows also has these types of members:
Methods
The IShellWindows interface has these methods.
| Method | Description |
|---|---|
| _NewEnum |
Retrieves an enumerator for the collection of Shell windows. |
| FindWindowSW |
Finds a window in the Shell windows collection and returns the window's handle and IDispatch interface. |
| get_Count |
Gets the number of windows in the Shell windows collection. |
| Item |
Returns the registered Shell window for a specified index. |
| OnActivated |
Occurs when a Shell window's activation state changes. |
| OnCreated |
Occurs when a new Shell window is created for a frame. |
| OnNavigate |
Occurs when a Shell window is navigated to a new location. |
| ProcessAttachDetach |
Deprecated. Always returns S_OK. |
| Register |
Registers an open window as a Shell window; the window is specified by handle. |
| RegisterPending |
Registers a pending window as a Shell window; the window is specified by an absolute PIDL. |
| Revoke |
Revokes a Shell window's registration and removes the window from the Shell windows collection. |
Remarks
A Shell window is a window that has been registered by calling IShellWindows::Register or IShellWindows::RegisterPending. Upon registration, the specified window is added to the collection of Shell windows, and granted a cookie that uniquely identifies the window within the collection. A window can be un-registered by calling IShellWindows::Revoke.
The Shell windows collection includes file explorer windows and web browser windows Internet Explorer and 3rd-party web browsers). Normally each Shell window implements IDispatch; IShellWindows::Item and IShellWindows::FindWindowSW provide ways to access a Shell window's IDispatch interface. For more information, see Dispatch Interface and Automation Functions.
| IID | IID_IShellWindows (85CB6900-4D95-11CF-960C-0080C7F4EE85) |
|---|---|
| CLSID | CLSID_ShellWindows (9BA05972-F6A8-11CF-A442-00A0C90A8F39) |
The following example shows how to retrieve an IShellWindows instance.
#include "exdisp.h"
...
IShellWindows *psw;
HRESULT hr;
hr = CoInitialize(NULL);
if (SUCCEEDED(hr))
{
hr = CoCreateInstance(
CLSID_ShellWindows,
NULL,
CLSCTX_ALL,
IID_IShellWindows,
(void**)&psw
);
if (SUCCEEDED(hr))
{
// Use the IShellWindows instance...
psw->Release();
}
}
Requirements
|
Product |
Internet Explorer 5 |
|---|---|
|
Header |
|
|
IDL |
|
|
DLL |
|
See also