Hiding Edit boxes in VC++

This is a discussion on Hiding Edit boxes in VC++ within the Windows Programming forums, part of the Platform Specific Boards category; How do I hide an edit box using code, not by checking/unchecking the visible box in the Edit Properties box. ...

  1. #1
    Unregistered
    Guest

    Unhappy Hiding Edit boxes in VC++

    How do I hide an edit box using code, not by checking/unchecking the visible box in the Edit Properties box.

    I'm trying to write an if statement to determine whether or not a box should be visible.

  2. #2
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Lightbulb Try this...

    To hide it:

    ShowWindow(edit_handle, SW_HIDE);

    To show it again:

    ShowWindow(edit_handle, SW_SHOW);

    I hope this helps!
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: trifaze_mattu@lycos.com

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

  3. #3
    Registered User WayTooHigh's Avatar
    Join Date
    Aug 2001
    Posts
    101
    ShowWindow(GetDlgItem(hwnd, ID_OF_CONTROL),SW_HIDE);
    Sometimes, the farthest point from the center is the center itself.

    Your life is your canvas, it's only as beautiful as you paint it.

  4. #4
    Registered User ski6ski's Avatar
    Join Date
    Aug 2001
    Posts
    133
    MFC. and a dialog

    GetDlgItem(IDC_EDIT1)->ShowWindow(TRUE); //Show edit
    GetDlgItem(IDC_EDIT1)->ShowWindow(FALSE);//Hide edit
    C++ Is Powerful
    I use C++
    There fore I am Powerful

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Edit box(es), and specialized onmouseover
    By Lurker in forum Windows Programming
    Replies: 7
    Last Post: 05-25-2003, 05:13 PM
  2. Edit Boxes, I need specifics..
    By MrWizard in forum Windows Programming
    Replies: 4
    Last Post: 06-30-2002, 05:42 PM
  3. Edit Boxes Question
    By Ruben in forum Windows Programming
    Replies: 2
    Last Post: 09-14-2001, 01:06 AM
  4. Edit Boxes Question
    By RubenJ in forum Windows Programming
    Replies: 1
    Last Post: 09-12-2001, 09:01 PM
  5. Password Edit Boxes
    By Unregistered in forum Windows Programming
    Replies: 1
    Last Post: 08-27-2001, 03:40 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21