Disabling controls on MFC

This is a discussion on Disabling controls on MFC within the C++ Programming forums, part of the General Programming Boards category; in my program that imworking onusing the MFC with C++, i have a problem. basically what my teacher wants is ...

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    11

    Disabling controls on MFC

    in my program that imworking onusing the MFC with C++, i have a problem. basically what my teacher wants is when you press a certain button, certain textfields should become disabled and you should not be allowed to enter anything in them, but i dont know what control to use for that. please help, thank you.

  2. #2
    Registered User
    Join Date
    Mar 2003
    Location
    UK
    Posts
    169
    Look at EnableWindow()

    Example:

    GetDlgItem( IDC_EDIT_1 )->EnableWindow(FALSE);

    GetDlgItem( IDC_EDIT_1 )->EnableWindow(TRUE);

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    There should aslo be a member of CEdit for SetReadOnly...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 09-21-2006, 07:14 AM
  2. I need help disabling Keyboard and Mouse input on Edit controls
    By Templario in forum Windows Programming
    Replies: 4
    Last Post: 01-07-2003, 12:59 AM
  3. MFC Controls and Thread Safety :: MFC
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 12-06-2002, 11:36 AM
  4. WIndows programming?
    By hostensteffa in forum Windows Programming
    Replies: 7
    Last Post: 06-07-2002, 09:52 PM
  5. Tab controls - MFC (revived)
    By Robert602 in forum Windows Programming
    Replies: 1
    Last Post: 01-22-2002, 12:32 PM

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