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. Tab Control

Tab Control

Scheduled Pinned Locked Moved C / C++ / MFC
5 Posts 3 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.
  • Z Offline
    Z Offline
    zakkas2483
    wrote on last edited by
    #1

    Hello All, I need to highlight the one of TAB of Tab Control. but TabCtrl_HighlightItem() is not working for me. Thank You in Advance.

    S 1 Reply Last reply
    0
    • Z zakkas2483

      Hello All, I need to highlight the one of TAB of Tab Control. but TabCtrl_HighlightItem() is not working for me. Thank You in Advance.

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      Sure you don't mean select it, as with TabCtrl_SetCurSel[^]

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      Z 1 Reply Last reply
      0
      • S Stuart Dootson

        Sure you don't mean select it, as with TabCtrl_SetCurSel[^]

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

        Z Offline
        Z Offline
        zakkas2483
        wrote on last edited by
        #3

        Thank You 4 Reply my Question. Yes, i don't want to Select the Tab but only highlight the one of the TAB to indicate that some think is new in that Highlighted TAB.

        D S 2 Replies Last reply
        0
        • Z zakkas2483

          Thank You 4 Reply my Question. Yes, i don't want to Select the Tab but only highlight the one of the TAB to indicate that some think is new in that Highlighted TAB.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          zakkas2483 wrote:

          ...to indicate that some think is new in that Highlighted TAB.

          Assuming that TabCtrl_HighlightItem() indeed does not work, how about changing its caption (by appending a '*' character)?

          "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          1 Reply Last reply
          0
          • Z zakkas2483

            Thank You 4 Reply my Question. Yes, i don't want to Select the Tab but only highlight the one of the TAB to indicate that some think is new in that Highlighted TAB.

            S Offline
            S Offline
            Stuart Dootson
            wrote on last edited by
            #5

            OK - I see. So...how is TabCtrl_HighlightItem not working for you? I've added a tab control to a sample project I have> It's MFC, but I've used the TabCtrl_HighlightItem macro to highlight items. Here's the method I have - it reacts to an edit control changing and cycles through the tabs of the control (the current tab index is in tabIdx_), toggling the highlight state.

            void CaaaDlg::OnEnChangeEdit1()
            {
            tabIdx_++;
            tabIdx_%=(TabCtrl_GetItemCount(tabs_.m_hWnd));
            bool isHighlighted = TCIS_HIGHLIGHTED == tabs_.GetItemState(tabIdx_, TCIS_HIGHLIGHTED);
            TabCtrl_HighlightItem(tabs_.m_hWnd, tabIdx_, isHighlighted?FALSE:TRUE);
            }

            Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

            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