Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. PropertyPage Title

PropertyPage Title

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Florin Ochiana
    wrote on last edited by
    #1

    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.

    P A 2 Replies Last reply
    0
    • F Florin Ochiana

      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.

      P Offline
      P Offline
      Prakash Nadar
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • F Florin Ochiana

        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 Offline
        A Offline
        Antti Keskinen
        wrote on last edited by
        #3

        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. A CTabCtrl class has a method called SetItem 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 of SetItem 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.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups