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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Get current tab position in a dialog box???

Get current tab position in a dialog box???

Scheduled Pinned Locked Moved C / C++ / MFC
question
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.
  • S Offline
    S Offline
    skinnyreptile
    wrote on last edited by
    #1

    :confused:I know it's going to be simple, but can anyone please tell me how can I get current tab position or ID in a dialog box?

    A R 2 Replies Last reply
    0
    • S skinnyreptile

      :confused:I know it's going to be simple, but can anyone please tell me how can I get current tab position or ID in a dialog box?

      A Offline
      A Offline
      AlexO
      wrote on last edited by
      #2

      send TCM_GETCURSEL message to the control int nIndex = static_cast<int>(::SendMessage(GetDlgItem(hMyDlg, ID_MYTABCTL), TCM_GETCURSEL, 0, 0));

      1 Reply Last reply
      0
      • S skinnyreptile

        :confused:I know it's going to be simple, but can anyone please tell me how can I get current tab position or ID in a dialog box?

        R Offline
        R Offline
        Ryan Binns
        wrote on last edited by
        #3

        If you're talking about the currently activated tab in a tab control, then the message above is correct. If you want to find which control is active, then use GetFocus(). Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
        Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"

        S 1 Reply Last reply
        0
        • R Ryan Binns

          If you're talking about the currently activated tab in a tab control, then the message above is correct. If you want to find which control is active, then use GetFocus(). Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
          Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"

          S Offline
          S Offline
          skinnyreptile
          wrote on last edited by
          #4

          Thanks for your help, Alex and Ryan. Send TCM_GETCURSEL message is all I needed.

          R 1 Reply Last reply
          0
          • S skinnyreptile

            Thanks for your help, Alex and Ryan. Send TCM_GETCURSEL message is all I needed.

            R Offline
            R Offline
            Ryan Binns
            wrote on last edited by
            #5

            skinnyreptile wrote: Thanks for your help You're welcome :) Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
            Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"

            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