Click to See Complete Forum and Search --> : Property Page titles


Sandrine
August 11th, 1999, 04:29 AM
Hi!

I have a property sheet control and all the property pages are the same but the title is different.
Is it possible to change the title of a property page?

Thanks in advance

Sandrine

Fox20
August 11th, 1999, 04:32 AM
Hi,

yes it is possible. Each single PropertyPage has to be an own dialog box. The title of the dialog box is the name of the register. Besides, you have to watch out that border is set to thin, the dialog is disactivated and that it is a child window, not a popup.

Good luck,


Fox

"I don't like much, really, do I? [laugh] But what I do like, I love passionately!" (Pet shop boys)

Uli Hecker
August 12th, 1999, 07:57 AM
Try the following code:

If your PropertyPage is e.g. called
CPropertyPage m_Mypage


then you can set the title with

m_Mypage.m_psp.pszTitle = _T("MyTitle");
m_MyPage.m_psp.dwFlags |= PSP_USETITLE;




Uli

Uli Hecker
August 12th, 1999, 07:58 AM
Try the following code:

If your PropertyPage is e.g. called
CPropertyPage m_Mypage


then you can set the title with

m_Mypage.m_psp.pszTitle = _T("MyTitle");
m_MyPage.m_psp.dwFlags |= PSP_USETITLE;




PS: Do this before you call AddPage in the PropertySheet
Uli

ChristianM
August 12th, 1999, 08:05 AM
are you try with a simple SetWindowText();

Sandrine
August 12th, 1999, 08:28 AM
Thanks a lot!

I follow the instructions given by Ulli and it's OK!

I have tried SetWindowText but it doesn't work: I write it before the AddPage, after the AddPage, in the OnInitDialog of the Property Page Class but I ve an assertion error

Sandrine

ChristianM
August 12th, 1999, 08:30 AM
ok..
alors c'est parfait!