Home COM GDI+ WebBrowser Data Access

IShellBrowser Interface

 

IID_IShellBrowser

{000214E2-0000-0000-C000-000000000046}

 

 

The IShellBrowser interface is exposed by Microsoft Windows Explorer and the Open File common dialog box to provide services for namespace extensions. It is a companion to the IShellView interface exposed by extensions.

 

Remarks

Applications do not implement this interface.

IShellBrowser is similar to the site interfaces that are often found in OLE hosting situations, such as the IOleControl and IOleControlSite. Extensions use IShellBrowser to communicate with Windows Explorer for such purposes as customizing user interface (UI) elements like menus, status text, and toolbars. This interface also provides the extension with a way to access storage to save its persistent view state.

 

IShellBrowser also allows extensions to do a variety of other tasks, including:

  • Insert menus into the composite menu; install the composite menu into the appropriate window frame, and remove the container's menu elements from the composite menu.

  • Set and display status text.

  • Enable or disable the frame's modeless dialog boxes.

  • Translate accelerator keystrokes intended for the container's frame.

 

IShellBrowser derives from the IOleWindow interface, and it represents the container's top-level window. Extensions that implement a custom folder view call the IOleWindow::GetWindow method to retrieve the folder view's window handle from Windows Explorer. They then create a child of this window to display information in folder view.

When implementing a namespace extension use the IShellBrowser implementation that is passed to IShellView::CreateViewWindow to communicate with Windows Explorer.

Service identifiers (IDs) such as SID_SCommDlgBrowser are use to query for the IShellBrowser interface. See the Knowledge Base article Retrieve the Top-Level IWebBrowser2 Interface from an ActiveX Control for more information on using service IDs.

 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IOleWindow Methods

Description

GetWindow

Gets a window handle.

ContextSensitiveHelp

Controls enabling of context-sensitive help.

IShellBrowser Methods

Description

InsertMenusSB

Allows the container to insert its menu groups into the composite menu that is displayed when an extended namespace is being viewed or used.

SetMenusSB

Installs the composite menu in the view window.

RemoveMenusSB

Permits the container to remove any of its menu elements from the in-place composite menu and to free all associated resources.

SetStatusTextSB

Sets and displays status text about the in-place object in the container's frame-window status bar.

EnableModelessSB

Tells Windows Explorer to enable or disable its modeless dialog boxes.

TranslateAcceleratorSB

Translates accelerator keystrokes intended for the browser's frame while the view is active.

BrowseObject

Tells Windows Explorer to browse to another folder.

GetViewStateStream

Retrieves an IStream interface that can be used for storage of view-specific state information.

GetControlWindow

Retrieves the window handle to a browser control.

SendControlMsg

Sends control messages to either the toolbar or the status bar in an Windows Explorer window.

QueryActiveShellView

Returns the currently active (displayed) Shell view object.

OnViewWindowActive

Called by the Shell view when the view window or one of its child windows gets the focus or becomes active.

SetToolbarItems

Adds toolbar items to Windows Explorer's toolbar.

 

GetWindow

 

FUNCTION IShellBrowser_GetWindow ( _

  BYVAL pthis AS DWORD PTR _

, BYREF phwnd AS DWORD _

  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[3] USING IShellBrowser_GetWindow (pthis, phwnd) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

ContextSensitiveHelp

 

FUNCTION IShellBrowser_ContextSensitiveHelp ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL fEnterMode AS LONG _

  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[4] USING IShellBrowser_ContextSensitiveHelp (pthis, fEnterMode) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

InsertMenusSB

 

FUNCTION IShellBrowser_InsertMenusSB ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL hmenuShared AS DWORD _
, BYREF lpMenuWidths AS OLEMENUGROUPWIDTHS _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[5] USING IShellBrowser_InsertMenusSB (pthis, hmenuShared, lpMenuWidths) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

SetMenusSB

 

FUNCTION IShellBrowser_SetMenusSB ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL hmenuShared AS DWORD _
, BYVAL holemenuRes AS DWORD _
, BYVAL hwndActiveObject AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[6] USING IShellBrowser_SetMenusSB (pthis, hmenuShared, holemenuRes, hwndActiveObject) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

RemoveMenusSB

 

FUNCTION IShellBrowser_RemoveMenusSB ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL hmenuShared AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[7] USING IShellBrowser_RemoveMenusSB (pthis, hmenuShared) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

SetStatusTextSB

 

FUNCTION IShellBrowser_SetStatusTextSB ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pszStatusText AS STRING _
  ) AS LONG

  LOCAL HRESULT AS LONG

  pszStatusText = UCODE$(pszStatusText) & $NUL
  CALL DWORD @@pthis[8] USING IShellBrowser_SetStatusTextSB (pthis, pszStatusText) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

EnableModelessSB

 

FUNCTION IShellBrowser_EnableModelessSB ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL
fEnable AS LONG _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[9] USING IShellBrowser_EnableModelessSB (pthis,
fEnable) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

TranslateAcceleratorSB

 

FUNCTION IShellBrowser_TranslateAcceleratorSB ( _
  BYVAL pthis AS DWORD PTR _
, BYREF
pmsg AS tagMSG _
, BYVAL
wID AS WORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[10] USING IShellBrowser_TranslateAcceleratorSB (pthis, pmsg, wID) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

BrowseObject

 

FUNCTION IShellBrowser_BrowseObject ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pidl AS DWORD _
, BYVAL wFlags AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[11] USING IShellBrowser_BrowseObject (pthis, pidl, wFlags) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

GetViewStateStream

 

FUNCTION IShellBrowser_GetViewStateStream ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL grfMode AS DWORD _
, BYVAL wFlags AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[12] USING IShellBrowser_GetViewStateStream (pthis, grfMode, wFlags) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

GetControlWindow

 

FUNCTION IShellBrowser_GetControlWindow ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL id AS DWORD _
, BYVAL phwnd AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[13] USING IShellBrowser_GetControlWindow (pthis, id, phwnd) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

SendControlMsg

 

FUNCTION IShellBrowser_SendControlMsg ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL id AS DWORD _
, BYREF uMsg AS tagMSG _
, BYVAL wParam AS DWORD _
, BYVAL lParam AS DWORD _
, BYVAL pret AS LONG _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[14] USING IShellBrowser_SendControlMsg (pthis, id, uMsg, wParam, lParam, pret) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

QueryActiveShellView

 

FUNCTION IShellBrowser_QueryActiveShellView ( _
  BYVAL pthis AS DWORD PTR _
, BYREF ppshv AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[15] USING IShellBrowser_QueryActiveShellView (pthis, ppshv) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

OnViewWindowActive

 

FUNCTION IShellBrowser_OnViewWindowActive ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL pshv AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[16] USING IShellBrowser_OnViewWindowActive (pthis, pshv) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

SetToolbarItems

 

FUNCTION IShellBrowser_SetToolbarItems ( _
  BYVAL pthis AS DWORD PTR _
, BYREF lpButtons AS TBBUTTON _
, BYVAL nButtons AS DWORD _
, BYVAL uFlags AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[17] USING IShellBrowser_SetToolbarItems (pthis, pshv) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

Page last updated on Monday, 03 April 2006 20:43:11 +0200