### Notebooks

A notebook control is a visual component that organizes related information on individual "pages" so that a user can find and display that information. It simulates a real notebook and provides the user with a recognizable visual component.

The native Windows tab control consists of a folder with tabs.
The CUA '91 notebook consists of a notebook client area, a binding, page buttons, optional tabs, and an optional status area.

Users select and display pages using a mouse or the keyboard. You can customize this notebook to meet varying application requirements, while providing a user-interface component that can be used easily to develop products that conform to the Common User Access (CUA) user-interface guidelines. Your application can specify different colors, sizes, and orientations for its notebooks, but the underlying function of the control remains the same.

The INotebook class supports both the CUA '91 notebook control and the Windows tab control. The CUA notebook control is a ported version of the OS/2 Presentation Manager notebook control. It has the same look-and-feel as the OS/2 Presentation Manager notebook control. The Windows tab control is a control that is native to the Windows environment.

#### Tab Controls

The ITabControl class gives you another option to implement a settings or properties dialog. ITabControl creates a window that appears as a stack of tabbed pages with an optional button area.

For OS/2, this control uses the BKS_TABBEDDIALOG style on the PM notebook. On the Windows operating system, this is the native tab control with some additional drawing to emulate the Windows property sheet.

You can use an ITabControl object as the client of an IFrameWindow to create a tab control dialog.

An ITabControl object manages a set of ITabPage objects and an optional set of IPushButton objects. You must create an ITabPage object or an object of a derived class for each page in the tab control. A tab page is a logical representation of a page in a tab control and has an associated page window and optional push buttons. A tab page object is not a wrapper for a platform window as are IWindow derived objects.

Each tab page has a style and either text or a bitmap to be displayed on the corresponding tab in the tab control. You can specify the text and bitmap for the tab page during ITabPage construction or by using one of the ITabPage Tab Text & Bitmap member functions. In the Windows environment, tab pages can have both text and a bitmap displayed on the tab simultaneously. In the OS/2 environment, you can assign both text and a bitmap for a tab, but only the last item set is displayed.

The optional push buttons in the tab control appear in a button area below the tab pages, or, in the OS/2 environment, the button area can optionally appear above the tab pages. You can specify buttons on a per page basis as well as specifying a set of common buttons. ITabControl displays the set of common buttons whenever the top page has no page specific buttons. You must manage common buttons via ITabControl member functions and manage page specific buttons via ITabPage member functions. To process the command events generated by tab control buttons, create a handler of an ICommandHandler derived class and attach it to either the tab control or frame window.

You can add one of the five predefined push buttons provided by the EButton enumeration as common or page specific buttons. You can use the same buttons in multiple page button sequences as well as the common button sequence. This allows maximum flexibility in tailoring the buttons that appear as the user selects each tab page. For example, one tab page may have Ok, Cancel, and Help buttons while all other pages have Ok, Default, Cancel, and Help buttons. You would add the Ok, Default, Cancel, and Help buttons as common push buttons and add the Ok, Cancel, and Help buttons as page push buttons for the unique page.

You can also create your own IPushButton objects for use as tab control buttons. You must use the window returned by buttonParent as the parent of any IPushButton objects you construct for use as either common buttons or page buttons.

To process the command events generated by tab control buttons, you must attach a handler derived from ICommandHandler to the tab control or frame window.

Controls

Creating and Using Notebooks
Hello World Version 6: Adding a Font Dialog, Pop-up Menus, Notebooks, and Graphics

IClipboard
INotebook
IPageSettings
ITabControl
ITabPage