
how to change the title of a property page
May,
You have to set it in the tab control for the property sheet. Here's some
quick code that should work for you... The tabs are indexed from left to
right starting at zero.
CPropertySheet *p = (CPropertySheet *)GetParent();
CTabCtrl *t = p->GetTabControl();
TCITEM item;
// set a mask to tell it to get the text for the item
item.mask = TCIF_TEXT;
t->GetItem(2,&item);
item.pszText = "Tom";
// set the new text in the control
t->SetItem(2, &item);
HTH,
Tom
Quote:
> Hi,
> Could someone shows me how to change the title of
> a property page in a property sheet? I called the
> page's SetWindowText() in the page's InitDialog()
> but the title is still the one in the .rc file.
> If this is done in the sheet's constructor, the
> program crashes. Please help. Thanks.
> Tony