Thread: Dialog question, radio to enable control

  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    9

    Dialog question, radio to enable control

    Hi,
    I'm trying to use radio buttons to enable/disable another control in a dialog box as soon as it is pressed. I know to use

    GetDlgItem(IDC_SLIDER_...)->EnableWindow(false);

    but don't know where to call it. Tried calling it in my dialog class in DoDataExchange function ( if(pDX->m_bSaveAndValidate) ... )
    but that doesn't work.
    do u see my problem? What happens when a dialog selection is changed.

    Appreciate any help...

  2. #2
    Registered User
    Join Date
    May 2004
    Posts
    9
    Figured it out. Called the message handler for BN_CLICKED.

  3. #3
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Also have a look at WM_INITDIALOG (OnInitDialog) or WM_CREATE if you want to set up the dialog/window before it is shown.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Edit controls of a dialog from another dialog...
    By Snake in forum Windows Programming
    Replies: 9
    Last Post: 07-01-2005, 02:18 PM
  2. Dialog Edit Control and Enter Key
    By Quantrizi in forum Windows Programming
    Replies: 2
    Last Post: 04-14-2004, 07:59 AM
  3. Easy Dialog Pop up question
    By Prog.Patterson in forum Windows Programming
    Replies: 5
    Last Post: 04-18-2002, 12:24 PM
  4. Dialog question w/ win32 API
    By Dalren in forum Windows Programming
    Replies: 3
    Last Post: 03-20-2002, 06:54 PM
  5. Resource question for dialog boxes.
    By Unregistered in forum Windows Programming
    Replies: 2
    Last Post: 02-13-2002, 08:58 AM