IShellWindows::Register Method

Registers an open window as a Shell window; the window is specified by handle.

Syntax

HRESULT Register(      
    IDispatch *pid,     long hwnd,     int swClass,     long *plCookie );

Parameters

pid
[in] The window's IDispatch interface.
hwnd
[in] A handle that specifies the window to register.
swClass
[in] A member of ShellWindowTypeConstants that specifies the type of window.
plCookie
[out] The window's cookie.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

In the context of the Shell windows collection, a cookie is a token that uniquely identifies a registered Shell window.

Use this method to register an open window; if the window is pending open, use IShellWindows::RegisterPending instead.

See Also

Tags :


Page view tracker