Thread: enabling disabled controls

  1. #1
    Madly in anger with you
    Join Date
    Nov 2005

    enabling disabled controls

    hey all,
    say I have a few controls on a dialog that I have set to disabled (the controls are disabled, not the dialog). when the user clicks a specific radio button, I would like to enable these controls. here are the details of the controls:

    1. a group box.
    2. static text.
    3. a combo box.
    4. a check box.
    5. another check box.

    all of those controls are set to disabled, but as I said I'd like to enable them all when the user makes a certain selection out of a group of radio buttons.

    I am just wondering what message I could send these controls to do this? I know I could send it with SendDlgItemMessage, but I simply don't know exactly what message could do this (I tried WS_ENABLED, but got an error from the compiler, I guess thats not a message and instead a window style).

    also, since this is all based on user selection, I could also use the message used to manually disable these controls (say if the user selects the first radio button and it enables these controls, and then they select another button, it would be ideal if I could disable these controls again).

    could anyone please help me out with the messages I am looking for? thank you in advance.
    Last edited by Bleech; 12-04-2006 at 03:21 AM.

    Intel Core 2 Quad Q6600 @ 2.40 GHz
    3072 MB PC2-5300 DDR2
    2 x 320 GB SATA (640 GB)
    NVIDIA GeForce 8400GS 256 MB PCI-E

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Rishon LeZion, Israel
    Have you tried GetDlgItem + EnableWindow?
    PS. WS_... is a style WM_... is a window message that can be sent.
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Controls
    By osal in forum Windows Programming
    Replies: 7
    Last Post: 06-11-2004, 10:38 AM
  2. Subclassing controls
    By filler_bunny in forum Windows Programming
    Replies: 3
    Last Post: 04-28-2004, 05:43 PM
  3. 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
  4. MFC Controls and Thread Safety :: MFC
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 12-06-2002, 11:36 AM
  5. Diff between window controls and dialog controls
    By Garfield in forum Windows Programming
    Replies: 13
    Last Post: 01-18-2002, 05:49 AM