1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Enable/Disable an Edit Control box in Property Page

Discussion in 'MFC' started by imported_taklubaba, Apr 1, 2008.

  1. imported_taklubaba

    imported_taklubaba New Member

    Joined:
    Apr 1, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    I am working on Property Page of a filter.
    I have added a ListBox in the property page to hold items for video
    resolution.
    Among the items in the list, there is one item called User Defined.

    I am trying to get a functionality where in, if I select User Defined
    in the ListBox, this selection will enable 2
    Edit Control boxes so that the user can fill in Height and Width.

    Now, if I deselect User Defined and select some other item in the
    ListBox, the Edit Control boxes should be disabled.

    How do I do it programatically in the OnReceiveMessage() function?

    Please let me know.
    I have been trying to enable the disabled Edit Control Boxes using,

    SendDlgItemMessage(hList, IDC_RATE3, WM_ENABLE, (WPARAM)TRUE, 0);

    But this does not work.
    Thanks,
    Taklu
     
  2. jencas

    jencas New Member

    Joined:
    Jun 27, 2008
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Create member variables for the controls and use CWnd::EnableWindow()
     

Share This Page