Band Object Interfaces

Band objects are required to implement IDeskband and IObjectWithSite. The Platform SDK says that they must also implement IPersist and IPersistStream, but this is not the case. Optionally, if the band accepts user input, it needs to implement IInputObject. Bands can also provide context menus by implementing IContextMenu. We have already discussed IObjectWithSite and IContextMenu, so basically all we need to do is get up to speed with IDeskband and IInputObject. So, let’s get to it.

IDeskband

IDeskband , the primary interface of the band object, is derived from IDockingWindow, which, in turn, is derived from IOleWindow.

IDeskband contains only one native method: GetBandInfo. There are three methods that are inherited from IDockingWindow, and two that have been inherited from IOleWindow. We have already seen IOleWindow while discussing IShellBrowser in Chapter 11, so we will forego another discussion. Table 13.1 describes all the methods of the IDeskband interface. The methods that have been marked with an asterisk do not have to be implemented.

Table 13-1. IDeskband Methods

IOleWindow

 

GetWindow

Returns the window handle to one of the windows participating in in-place activation (frame, document, parent, or in-place object window).

ContextSensitiveHelp*

Determines whether context-sensitive help mode should be entered during an in-place activation session.

IDockingWindow

 

ShowDW

Called when the docking window is supposed to be shown or hidden. ...

Get VB Shell Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.