CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2001
    Location
    New Jersey
    Posts
    312

    Property Sheet and Pages

    Hi all,

    I have created a propererty sheet and I am adding the pages to it .

    Each of those pages had predetermined heading that shows up on its tab. My question is before I add one of these pages to the sheet can I change the name to the tab before I add it and if so how?

    Please this will be great if anyone has the answer for me.


    Thanks in advance.
    http://www.dewgames.com
    Shareware and Free games!

  2. #2
    Join Date
    Oct 2004
    Posts
    46

    Re: Property Sheet and Pages

    Try This,

    CTabCtrl *pTab = GetTabControl();

    TC_ITEM tcItem;
    tcItem.mask = TCIF_TEXT;
    tcItem.pszText = "Dialog Text";
    pTab->SetItem(1, &tcItem);

  3. #3
    Join Date
    Oct 2004
    Posts
    46

    Re: Property Sheet and Pages

    Note, the 1 in SetItem is the index number to the page you want to change. For the first page I should have used 0.

  4. #4
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917

    Re: Property Sheet and Pages

    Or you can also modify constructor of the class derived from CPropertyPage to take ID of the string. Default this ID to 0.
    Initialize page object by passing appropriate string ID from string resources in a class that uses it, in class’ initializer list.
    Now you can use this class to instantiate multiple pages with different tab text.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured