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 some area invisible

how to make some area invisible

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

    hi, guys I am newer to MFC and have a question here ---------------- | | | | | A | |_______________| | | | B | |_______________| Area A and B is two zones, I have a Button in A, and if i click the button, B disappears, showing below, only A; if i click the button again, B shows like above pic ---------------- | | | | | A | |_______________| my question is how to implenment this function? could you guys give me some idea? thank you very much

    _ G L V 4 Replies Last reply
    0
    • L lyp2060

      hi, guys I am newer to MFC and have a question here ---------------- | | | | | A | |_______________| | | | B | |_______________| Area A and B is two zones, I have a Button in A, and if i click the button, B disappears, showing below, only A; if i click the button again, B shows like above pic ---------------- | | | | | A | |_______________| my question is how to implenment this function? could you guys give me some idea? thank you very much

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      When you design the dialog, make it with area A and B showing. In the OnInitDialog function of the dialog use SetWindowPos method and set the new height in its cy parameter. On button click use SetWindowPos again with the full height in the cy parameter. You can get the current window position using GetWindowRect function.

      «_Superman_» I love work. It gives me something to do between weekends.
      Microsoft MVP (Visual C++)

      1 Reply Last reply
      0
      • L lyp2060

        hi, guys I am newer to MFC and have a question here ---------------- | | | | | A | |_______________| | | | B | |_______________| Area A and B is two zones, I have a Button in A, and if i click the button, B disappears, showing below, only A; if i click the button again, B shows like above pic ---------------- | | | | | A | |_______________| my question is how to implenment this function? could you guys give me some idea? thank you very much

        L Offline
        L Offline
        loyal ginger
        wrote on last edited by
        #3

        You can handle the button click and in the handler, resize the window to appropriate sizes.

        1 Reply Last reply
        0
        • L lyp2060

          hi, guys I am newer to MFC and have a question here ---------------- | | | | | A | |_______________| | | | B | |_______________| Area A and B is two zones, I have a Button in A, and if i click the button, B disappears, showing below, only A; if i click the button again, B shows like above pic ---------------- | | | | | A | |_______________| my question is how to implenment this function? could you guys give me some idea? thank you very much

          G Offline
          G Offline
          Garth J Lancaster
          wrote on last edited by
          #4

          I think you may need to look at something like 'expanding and collapsing dialogs' .... Expanding and collapsing Dialogs[^] is that what you meant ? 'g'

          L 1 Reply Last reply
          0
          • G Garth J Lancaster

            I think you may need to look at something like 'expanding and collapsing dialogs' .... Expanding and collapsing Dialogs[^] is that what you meant ? 'g'

            L Offline
            L Offline
            lyp2060
            wrote on last edited by
            #5

            thank you, Good Garth, that's exactly what i need :-D

            1 Reply Last reply
            0
            • L lyp2060

              hi, guys I am newer to MFC and have a question here ---------------- | | | | | A | |_______________| | | | B | |_______________| Area A and B is two zones, I have a Button in A, and if i click the button, B disappears, showing below, only A; if i click the button again, B shows like above pic ---------------- | | | | | A | |_______________| my question is how to implenment this function? could you guys give me some idea? thank you very much

              V Offline
              V Offline
              vasu_sri
              wrote on last edited by
              #6

              might be these functions useful for u. MoveWindow() or SetWindowPos().

              Regards, Srinivas

              L 1 Reply Last reply
              0
              • V vasu_sri

                might be these functions useful for u. MoveWindow() or SetWindowPos().

                Regards, Srinivas

                L Offline
                L Offline
                lyp2060
                wrote on last edited by
                #7

                thanks, the problem has been solved

                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