The BKM_SETNOTEBOOKCOLORS message is used to change the color of the major
tab background and text, the minor tab background and text, and the notebook
page background. The following list shows the mapping between the various
notebook parts and their associated notebook attributes.
Major tab background
BKA_BACKGROUNDMAJORCOLOR or
BKA_BACKGROUNDMAJORCOLORINDEX. This color is set initially to SYSCLR_PAGEBACKGROUND.
The currently selected major tab has the same background color as the notebook
page background.
Major tab text
BKA_FOREGROUNDMAJORCOLOR
or BKA_FOREGROUNDMAJORCOLORINDEX. This color is set initially to SYSCLR_WINDOWTEXT.
Minor tab background
BKA_BACKGROUNDMINORCOLOR
or BKA_BACKGROUNDMINORCOLORINDEX. This color is set initially to SYSCLR_PAGEBACKGROUND.
The currently selected minor tab has the same background color as the notebook
page background.
Minor tab text
BKA_FOREGROUNDMINORCOLOR
or BKA_FOREGROUNDMINORCOLORINDEX. This color is set initially to SYSCLR_WINDOWTEXT.
Notebook page background
BKA_BACKGROUNDPAGECOLOR
or BKA_BACKGROUNDPAGECOLORINDEX. This color is set initially to SYSCLR_PAGEBACKGROUND.
If a notebook attribute is set, all parts of the notebook that are mapped
to this color are changed. The following sample code shows how to change
the color of the major tab background:
/* Color index value */ulColorIdx = SYSCLR_WINDOW;
/* Major tab background */
ulColorRegion = BKA_BACKGROUNDMAJORCOLORINDEX;
WinSendMsg(hwndBook,
BKM_SETNOTEBOOKCOLORS,
MPFROMLONG(ulColorIdx),
MPFROMLONG(ulColorRegion));
[Back]
[Next]