Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8137363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:05:35+00:00 2026-06-06T11:05:35+00:00

I have a MFC dialog based application. The main dialog contain a child dialog

  • 0

I have a MFC dialog based application.

The main dialog contain a child dialog (used in a CTabCtrl control).

  • CDialog mainDlgClass;

  • CMyChildDialog childDlgClass;

How I can be able to modify the controls of the child dialog from the main dialog or the possibility to send a message, eg: via PostMessage and using RegisterWindowMessage so I can modify the child dialog’s controls?

I dont know howto retrieve a handle of the child dialog.

void mainDlgClass::check() 
{
   if(condition)
       PostMessage_to_the_child_dialog(***);
   OR
   if(condition)
       Modify_CStatic_text_on_the_child_dialog(***);

}

Edit:

Screenshot of the structure:

Resource editor

resource editor

Main dialog + CTabCtrl containing the ChidlDialog

main dialog

Child dialog have WS_CHILD property set.

Resolved.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T11:05:37+00:00Added an answer on June 6, 2026 at 11:05 am

    Assuming that the second dialog is a child dialog of the main (it has WS_CHILD style), it must be created by the main dialog. Child dialog is confined to a client area of the parent window.

    You can provide public member functions (accessors) in the child dialog class to be accessed by the main dialog and change whatever you need. Alternatively, you can access subclassed child’s dialog controls directly if they are declared public (led OOP-like).

    The problem is that you may refer to a second dialog as child while it is not really a child (does not have WS_CHILD style). Nevertheless, you can use method described above if the second dialog is spawned as modeless.

    If modal, the approach may differ, since the main dialog is disabled; therefore, user cannot access main dialog controls. If this is a case, could you please give us more information?

    For example, under what circumstances, you want to alter controls.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MFC dialog based application in which I use ::system() function to
How can I print a document using MFC Dialog Based Application? I have made
I have created Dialog Based application in MFC (VS 2008).When I do #include in
I have an MFC-driven dialog-based application created with MSVS2005. Here is my problem step
I have a dialog based MFC application through which I have to call a
I have a custom MFC dialog CMyDialog , with a custom control of type
I'm coding an MFC application in which i have a dialog box with multiple
More exactly, the web browser control. In a WM6 dialog based MFC project. This
i am working on a Dialog based application in MFC, I need something just
In our application we have an MFC dialog that opens and processes some data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.