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. Property Page Tab should highlight

Property Page Tab should highlight

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
3 Posts 2 Posters 0 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.
  • R Offline
    R Offline
    RamL
    wrote on last edited by
    #1

    Hi, I am working on VC++ project. Property Sheet has a number of property pages, so I want to highlight each property page TAB on its selection. Hightlight means it may paint each page TAB portion or should show same TAB text with different color. Would you tell me the the way, How can I do it? Thanks in advance, Ramesh :-O

    O 1 Reply Last reply
    0
    • R RamL

      Hi, I am working on VC++ project. Property Sheet has a number of property pages, so I want to highlight each property page TAB on its selection. Hightlight means it may paint each page TAB portion or should show same TAB text with different color. Would you tell me the the way, How can I do it? Thanks in advance, Ramesh :-O

      O Offline
      O Offline
      Owner drawn
      wrote on last edited by
      #2

      You can do that in the OnSetActive() method... Also take a look at the GetTabControl() method of the CPropertySheet Class. It returns a reference to a particular CTabCtrl object. CTabCtrl class has a method called CTabCtrl::HighlightItem.

      BOOL HighlightItem(
      int idItem,
      BOOL fHighlight = TRUE
      );

      Hope this will be sufficient for you...:)

      Happy christmas friends. May the Love of My Lord and Saviour Jesus bring forth Joy and Happiness into your life too. --Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord

      R 1 Reply Last reply
      0
      • O Owner drawn

        You can do that in the OnSetActive() method... Also take a look at the GetTabControl() method of the CPropertySheet Class. It returns a reference to a particular CTabCtrl object. CTabCtrl class has a method called CTabCtrl::HighlightItem.

        BOOL HighlightItem(
        int idItem,
        BOOL fHighlight = TRUE
        );

        Hope this will be sufficient for you...:)

        Happy christmas friends. May the Love of My Lord and Saviour Jesus bring forth Joy and Happiness into your life too. --Owner Drawn --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord

        R Offline
        R Offline
        RamL
        wrote on last edited by
        #3

        Thanks, I want to re-modify my question. When we select the property sheet page tabs, then the selected page tab text should change the color of page tab text or highlight the tab text. Error is comming from the fallowing snippet that is, Error : " 'CPropertySheet::GetTabControl' : illegal call of non-static member function" How to access the GetTabContol() from CPropertyPage derived class? BEGIN_MESSAGE_MAP(CPage2, CPropertyPage) //{{AFX_MSG_MAP(CPage2) // NOTE: the ClassWizard will add message map macros here //}}AFX_MSG_MAP END_MESSAGE_MAP() BOOL CPage2::OnSetActive() { CTabCtrl *pTabCtrl = CPropertySheet::GetTabControl(); TC_ITEM item; item.mask = TCIF_TEXT; item.pszText = "New Label"; pTabCtrl->SetItem (1, &item ); // CTabCtrl::HighlightItem(1, TRUE); return CPropertyPage::OnSetActive(); } wating for you reply, - Ramesh.

        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