Example
The following example creates and customizes a tab strip.
C++
// Set number of sheets
spr->SetSheetCount(4);
// Set left most sheet
spr->SetTabStripLeftSheet(2);
// Always show the tab strip
spr->SetTabStripPolicy(1);
HFONT fnt;
fnt = CreateFont(20,0,0,0,0,0,0,0,0,0,0,0,0,"Comic Sans MS");
// Set font for tab strip
spr->SetTabStripFont(fnt);
// Set ratio in relation to the width of the control
spr->SetTabStripRatio(1.5);
// This example uses GetTabStripPolicy
WORD w;
char c[10];
char str[200];
w = spr->GetTabStripPolicy();
if (w = 1)
{
itoa(w, (LPSTR)c, 10);
strcpy(str, "The tab strip policy is set to ");
strcat(str, c);
strcat(str, " (Always)");
}
AfxMessageBox(str);