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. "Got Focus" on a tab page

"Got Focus" on a tab page

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 Posts 4 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.
  • G Offline
    G Offline
    Ger Hayden
    wrote on last edited by
    #1

    When I click a tab page I want to be able to set a flag to indicate to the system that this page has been visited. Something like OnGetFocus(). Does such a funciton or something similar exist? Basically when a page gets focus it needs to ensure that any activity on its sister page has been saved before it can proceed, so the sister page will need to have set something GER Ger

    B D 2 Replies Last reply
    0
    • G Ger Hayden

      When I click a tab page I want to be able to set a flag to indicate to the system that this page has been visited. Something like OnGetFocus(). Does such a funciton or something similar exist? Basically when a page gets focus it needs to ensure that any activity on its sister page has been saved before it can proceed, so the sister page will need to have set something GER Ger

      B Offline
      B Offline
      Barm
      wrote on last edited by
      #2

      Hi I have done something like that before... the information on the previous tab needs to be save when another tab is selected.. this is what i have done... 1. Create a variable to store the selected tab... 2. Use OnClickTab to find out which is the newly selected tab... 3. Check if different from last selected tab - if true... prompt save and save previous tab... 4. Refresh the information on the new tab... 5. Save new tab selection to variable I hope this helps... Thomas

      V G 2 Replies Last reply
      0
      • B Barm

        Hi I have done something like that before... the information on the previous tab needs to be save when another tab is selected.. this is what i have done... 1. Create a variable to store the selected tab... 2. Use OnClickTab to find out which is the newly selected tab... 3. Check if different from last selected tab - if true... prompt save and save previous tab... 4. Refresh the information on the new tab... 5. Save new tab selection to variable I hope this helps... Thomas

        V Offline
        V Offline
        vikas amin
        wrote on last edited by
        #3

        U needs to save last tab info when another tab is selected Vikas Amin Embin Technology Bombay vikas.amin@embin.com

        1 Reply Last reply
        0
        • B Barm

          Hi I have done something like that before... the information on the previous tab needs to be save when another tab is selected.. this is what i have done... 1. Create a variable to store the selected tab... 2. Use OnClickTab to find out which is the newly selected tab... 3. Check if different from last selected tab - if true... prompt save and save previous tab... 4. Refresh the information on the new tab... 5. Save new tab selection to variable I hope this helps... Thomas

          G Offline
          G Offline
          Ger Hayden
          wrote on last edited by
          #4

          OnClickTab - Now that sounds like a very good idea. I'll try it out... Thanks Ger

          1 Reply Last reply
          0
          • G Ger Hayden

            When I click a tab page I want to be able to set a flag to indicate to the system that this page has been visited. Something like OnGetFocus(). Does such a funciton or something similar exist? Basically when a page gets focus it needs to ensure that any activity on its sister page has been saved before it can proceed, so the sister page will need to have set something GER Ger

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

            Ger Hayden wrote:

            When I click a tab page I want to be able to set a flag to indicate to the system that this page has been visited.

            A page will have an invalid window handle until it has been visited at least once.

            Ger Hayden wrote:

            Basically when a page gets focus it needs to ensure that any activity on its sister page has been saved before it can proceed, so the sister page will need to have set something

            This is what OnKillFocus() is for.


            "Take only what you need and leave the land as you found it." - Native American Proverb

            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