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. How to make a button invisible dynamically

How to make a button invisible dynamically

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

    Hello, How can i make a button invisible dynamically and then make it visible again? I think CButton::SetButtonStyle() cannot do. Thanks in advance..

    M 1 Reply Last reply
    0
    • C caykahve

      Hello, How can i make a button invisible dynamically and then make it visible again? I think CButton::SetButtonStyle() cannot do. Thanks in advance..

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      ShowWindow(SW_HIDE), ShowWindow(SW_SHOW). Stability. What an interesting concept. -- Chris Maunder

      C 1 Reply Last reply
      0
      • M Mike Dimmick

        ShowWindow(SW_HIDE), ShowWindow(SW_SHOW). Stability. What an interesting concept. -- Chris Maunder

        C Offline
        C Offline
        caykahve
        wrote on last edited by
        #3

        i thought ShowWindow did not work for the controls, but only the windows. :-O thank you!

        C B 2 Replies Last reply
        0
        • C caykahve

          i thought ShowWindow did not work for the controls, but only the windows. :-O thank you!

          C Offline
          C Offline
          Cedric Moonen
          wrote on last edited by
          #4

          Controls are windows also :).

          1 Reply Last reply
          0
          • C caykahve

            i thought ShowWindow did not work for the controls, but only the windows. :-O thank you!

            B Offline
            B Offline
            Blake Miller
            wrote on last edited by
            #5

            If you make a button on a form/dialog invisible, you might also want to disable it as well, because otherwise, the user might still tab to it or otherwise activate the window. ControlWindow.EnableWidnow(FALSE); ControlWindow.ShowWindow(SW_HIDE); ... ControlWindow.ShowWindow(SW_SHOW); ControlWindow.EnableWidnow(TRUE);

            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