Changing Caption of CPropertyPage at runtime? 
Author Message
 Changing Caption of CPropertyPage at runtime?

 I'm calling
m_PPGet.m_pPSP->dwFlags |= PSP_USETITLE;

m_PPGet.m_pPSP->pszTitle = _T("Library");

  do these calls have to happen before AddPage? Is there a way to do it
after AddPage?

thanks

mike



Sun, 14 Nov 2004 10:46:36 GMT  
 Changing Caption of CPropertyPage at runtime?
mike,

You can change the property page (tab) caption it like this (example
code is a member function of the property sheet):

        TCITEM tci;
        tci.mask = TCIF_TEXT;
        tci.pszText = "New Text for this Page";
        CTabCtrl * pT = ( (CPropertySheet*)
                                GetParent())->GetTabControl();
        pT->SetItem( PropPageNumber, &tci );

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Sun, 14 Nov 2004 21:25:42 GMT  
 Changing Caption of CPropertyPage at runtime?


Quote:
>mike,

>You can change the property page (tab) caption it like this (example
>code is a member function of the property sheet):

>    TCITEM tci;
>    tci.mask = TCIF_TEXT;
>    tci.pszText = "New Text for this Page";
>    CTabCtrl * pT = ( (CPropertySheet*)
>                            GetParent())->GetTabControl();
>    pT->SetItem( PropPageNumber, &tci );

>Dave

Since you're using GetParent() this works in  a member function of a
property page.   And to change the currently selected page he could:

CTabCtrl * pT = ( (CPropertySheet*)GetParent())->GetTabControl();
PropPageNumber = pT->GetCurSel();
pT->SetItem( PropPageNumber, &tci );
... Dave



Mon, 15 Nov 2004 07:53:36 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to change on runtime the caption of a C++ dialog app main window

2. How to change on runtime the caption of a C++ dialog app main window

3. Changing a Dialog's CAPTION during runtime

4. Change popup menu captions at runtime (ModifyMenu)

5. Change caption of childwindow runtime ?

6. Changing the Caption of a Modal Dialog at Runtime

7. Changing Floating Toolbar Caption Runtime...

8. How to change the caption of a MDI frame at runtime

9. CPropertyPage caption?

10. CPropertyPage caption adjustment

11. Captions on the CPropertyPage tab...

12. Disable / enable CPropertyPage at runtime

 

 
Powered by phpBB® Forum Software