|
-
April 27th, 1999, 08:54 AM
#1
Caption of a PropertyPage
Hi,
I've declared a PropertySheet, and add some pages ( PropertyPage ) into it, like this :
CPropertySheet m_ps;
CMyPropertyPage1 m_pp1;
CMyPropertyPage2 m_pp2;
....
m_ps.AddPage(&m_pp1);
m_ps.AddPage(&m_pp2);
And now I want to change the caption of the pages, so I do :
m_pp1.SetWindowText("New Caption1");
m_pp2.SetWindowText("New Caption2");
But, it doesn't work !! Nothing change !!
Why ?
How can I change the caption of a PropertyPage which is into a PropertySheet ?
Thanks in advance.
Frédéric Naudeau.
-
April 27th, 1999, 09:35 AM
#2
Re: Caption of a PropertyPage
This is a bit tricky.
If you want to change the text of the pages you actually have to change the text of the tab control.
Let's say you want to change the text for your page1 (m_pp1).
int nIndex = m_ps.GetPageIndex (&m_pp1);
CTabCtrl* pTabCtrl = m_ps.GetTabControl();
TC_ITEM tc_item;
tc_item.mask = TCIF_TEXT;
tc_item.pszText = "New caption";
pTabCtrl->SetItem (nIndex,&tc_item);
HTH
Jignesh
-
April 27th, 1999, 11:18 AM
#3
Re: Caption of a PropertyPage
Hi,
You can use the pszTitle attribute of the CPropertyPage m_psp member
Hope this help
Souad
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|