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. visible/invisible

visible/invisible

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

    How can I make an Editbox control visible or invisible throw the code. I know : object.visible=1 but what is the object??? can some one can give an example ( let's say that the edit controll ID is ID_EDIT2

    C 1 Reply Last reply
    0
    • M meirav

      How can I make an Editbox control visible or invisible throw the code. I know : object.visible=1 but what is the object??? can some one can give an example ( let's say that the edit controll ID is ID_EDIT2

      C Offline
      C Offline
      Chris Meech
      wrote on last edited by
      #2

      CWnd* pCtrl = GetDlgCtrlID(ID_EDIT2);
      if ( pCtrl )
      if ( pCtrl->IsVisible() )
      pCtrl->ShowWindow(SW_HIDE);
      else
      pCtrl->ShowWindow(SW_NORMAL);

      Is this what you are looking for? Chris

      M 1 Reply Last reply
      0
      • C Chris Meech

        CWnd* pCtrl = GetDlgCtrlID(ID_EDIT2);
        if ( pCtrl )
        if ( pCtrl->IsVisible() )
        pCtrl->ShowWindow(SW_HIDE);
        else
        pCtrl->ShowWindow(SW_NORMAL);

        Is this what you are looking for? Chris

        M Offline
        M Offline
        Michael P Butler
        wrote on last edited by
        #3

        Shouldn't that be CWnd* pCtrl = GetDlgItem(ID_EDIT2); Michael :-)

        C 1 Reply Last reply
        0
        • M Michael P Butler

          Shouldn't that be CWnd* pCtrl = GetDlgItem(ID_EDIT2); Michael :-)

          C Offline
          C Offline
          Chris Meech
          wrote on last edited by
          #4

          Thanks, Michael. You are correct. In my haste to post, I forgot to try and compile :-O Chris

          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