The tab pages provide a method for organizing the information in a notebook so that the user easily can see and navigate to that information. When a page is inserted with a major or minor tab attribute, the notebook displays a tab for that page, based on the orientation of the notebook. The contents of the tab can be painted either by the notebook control or the application.
If the notebook control is to paint the tabs, the application must associate a text string or bit map with the page whose tab is to be drawn. This is done by sending the BKM_SETTABTEXT or BKM_SETTABBITMAP message to the notebook control for the specified page. If neither of these messages is sent for an inserted page with a major or minor tab attribute, the application must draw the contents of the tab, through ownerdraw. The application receives a WM_DRAWITEM message whenever a tab page that has no text or bit map associated with it is to be drawn. The application can either draw the tab contents or return FALSE, in which case the notebook control fills the tab with the tab background color.
Positioning Tabs in Relation to the Top Tab:
There are seven page edges that define the back pages. The page attribute
(BKA_MAJOR or BKA_MINOR) and the topmost page determine how the tabs are
positioned. In most cases, the tabs must be drawn when their position changes.
For example, this can happen when a page with a tab attribute is brought
to the top of the notebook.
The new top major or minor tab will appear attached to the top page. The other tabs will appear as described in the following list. This information is provided to help you understand the relationship between the top tab and the other tabs so that you can organize the information you put into a notebook appropriately. The application has no control over tab positioning.
The minor tabs are all positioned on the third page edge from the top, thereby giving the appearance of being between the top major tab and the next major tab.