Change Parent Dialog backcolor from Child Dialog

Discussion in 'MFC' started by shobhit_ra, Apr 2, 2009.

  1. shobhit_ra

    shobhit_ra New Member

    Joined:
    Apr 2, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    Hello All

    I have MFC Dialog based application.

    I have to change the Background color of parent dialog when the Child Dialog CheckBox is clicked.

    Please suggest me and provide me the code.

    Thanks a lot.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Pass the needed message to the parent dialog and this should do it.
     
  3. shobhit_ra

    shobhit_ra New Member

    Joined:
    Apr 2, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    Which message I have to send to change the BKColor of parent dialog.
    And how to send it ? What is the code ? Also how to receive the message in the parent dialog?

    Thanks
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Depends on your implementation but CTLCOLOR related messages.

    First try to change them using the same dialog and then try doing it from other dialog
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice