PropertyPage Title
-
How can I change the title of the PropertyPage in a propertysheet. I mean the name of the tab. I tried with SetWindowText() but it doesn't work. Thanks ----- We are what we repeatedly do. Excellence, then, is not an act, but a habit.
-
How can I change the title of the PropertyPage in a propertysheet. I mean the name of the tab. I tried with SetWindowText() but it doesn't work. Thanks ----- We are what we repeatedly do. Excellence, then, is not an act, but a habit.
Get the tabcontrol of the propertysheet and set the text of the corresponding item whose text you want to change.
MSN Messenger. prakashnadar@msn.com
-
How can I change the title of the PropertyPage in a propertysheet. I mean the name of the tab. I tried with SetWindowText() but it doesn't work. Thanks ----- We are what we repeatedly do. Excellence, then, is not an act, but a habit.
A property sheet, when ran, consists of a property sheet object (the parent), a collection of property page objects (individual dialogs) and a tab control used to switch between the pages. During the first creation stage, the tab texts are taken from the dialog template titles. Changing these pre-build will alter the tab texts. During run-time, you can change the title by first getting the property sheet object, then asking for the tab control via
GetTabCtrl
. ACTabCtrl
class has a method calledSetItem
that takes the index of the page and a TCITEM structure. Assuming in the following example, that m_wndPropertySheet was a pointer to CPropertyPage class, this code fragment will alter the text of the first tab// Get the tab control
CTabCtrl* m_ptrTab = m_wndPropertySheet->GetTabCtrl();// Construct a TCITEM structure
TCITEM ti;
ti.mask = TCIF_TEXT;
ti.pszText = "New tab text";// Alter the text
m_ptrTab->SetItem( 0, &ti );Hope this will help you out. Naturally, if you are unsure where the correct page is, you can use
GetItem
ínstead ofSetItem
to get the item's text and determining the index from there... -Antti Keskinen ---------------------------------------------- The definition of impossible is strictly dependant on what we think is possible.