After a page is inserted into a notebook, you must facilitate the display of information for this page when it is brought to the top of the book. The notebook provides a top page area in which the application can display windows or dialogs for the topmost page. For each inserted page, the application must associate the handle of a window or dialog that is to be invalidated when the page is brought to the top of the book. The application can associate the same handle with different pages, if desired.
The application must send a BKM_SETPAGEWINDOWHWND message to the notebook in order to associate the application page window or dialog handle with the notebook page being inserted. Once done, the notebook invalidates this window or dialog whenever the notebook page is brought to the top of the book. If no application page window handle is specified for an inserted page, no invalidation can be done by the notebook for that page. However, the application receives a BKN_PAGESELECTED notification code when a new page is brought to the top of the notebook, at which time the application can invalidate the page.
The notebook also sends a BKN_PAGESELECTEDPENDING notification code to the application before the new page is selected. The application can use this message to prevent the page from being turned to. This is useful when the application wants to validate a page's contents.
The following sections describe how to associate either a window handle or a dialog handle with an inserted page.