active/inactive

This is a discussion on active/inactive within the Windows Programming forums, part of the Platform Specific Boards category; Is it possible to make something like a button, edit box, etc...to become inactive or active when a msg is ...

  1. #1
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052

    active/inactive

    Is it possible to make something like a button, edit box, etc...to become inactive or active when a msg is recieved?

    eg.
    Code:
    case WM_COMMAND:
          switch(wParam)
    
        case IDC_BUTTON1:
    // makes it active...
    break;
    
        case IDC_BUTTON2:
    // inactive again...
    Its sloppy and probably has a mistake, but you get what I mean...

    Thanks
    -Chris

  2. #2
    Registered User The15th's Avatar
    Join Date
    Aug 2001
    Posts
    125
    yes,
    you can call EnableWindow(hWnd,TRUE); to enable a control or you can call EnableWindow(hWnd,FALSE); to disable a control. It works with all windows, controls, menu's ect ect.
    arrh, i got nothing good to say.
    http://www.praxis1.vic.edu.au/home/dcola/

Popular pages Recent additions subscribe to a feed

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