home *** CD-ROM | disk | FTP | other *** search
- NOTEBOOK CLASS SAMPLE CODE - 10/12/93
- -------------------------------------
-
- SOURCE FILES:
- -------------
- The following source files comprise the notebook class sample code:
-
- - notebook.cpp, notebook.h (defines TNotebook class)
- - vscroll.cpp, vscroll.h (defines vscroll gadget class)
- - hscroll.cpp, hscroll.h (defines hscroll gadget class)
- - utils.cpp, utils.h (code for logging debug messages)
-
- - nb.cpp, nb.h (test program for TNotebook class)
- - pn.cpp, pn.h (program notebook sample app)
-
-
- TNotebook class:
- ----------------
- The "TNotebook" class is a sample class designed to be "mixed-in" with
- a window class. It allows you to turn any of your windows (or subclasses
- of windows) into a notebook window. The notebook look is obtained by
- taking over a part of the window non-client area (selectable from top,
- right, bottom, left) and drawing notebook tabs and a mini tab scrollbar
- in the area. If the window horizontal or vertical scrollbar also belongs
- in the area, a custom (smaller) scrollbar is drawn in the area also.
-
- The "nb" program (see below) shows the basics of how to create a notebook
- and how to operate it. There is a special method of handling the
- WM_SIZE messages for the TNotebook subclasses that will prevent multiple
- nonclient area painting. See the comment at the top of the "notebook.cpp"
- file and the "EvSize()" method in nb.cpp for more details.
-
-
- NB.EXE:
- -------
- The "nb" program was designed to test the TNotebook class and can also
- be used to test new TNotebook subclasses. It creates notebooks with
- 2000 pages and draws a special pattern on each page along with the
- page name. The pattern is designed to help test whether the TNotebook
- scrollbars are operating correctly (a red rectangle should be at the
- leftmost, topmost, rightmost, and bottommost positions of the page).
- The menu allows you to create notebooks with tabs in all 4 positions
- (top, right, bottom, and left).
-
-
- PN.EXE:
- -------
- The program "pn" is a simplified implementation of the Windows "program
- manager" program with a notebook twist. It is an MDI app where each MDI
- child window is a notebook. On startup, the program reads the
- program manager ".grp" files and each notebook created shows the available
- groups on its tabs and allows selection of a group of icons into the
- notebook's current page.
-
- The program "pn.exe" can be run as a normal program under program manager
- or it can be used in place of program manager (by changing the "shell" line
- of your windows "system.ini" file to something like "shell=c:\nb\pn.exe").
-
-