Answer the question
In order to leave comments, you need to log in
How to access the parent dialog window element from the child dialog window?
Hello.
I have a main dialog. Let's name it CAppDlg
with ID - IDD_MAINFORM
.
There is also another dialogue. Let's name it CAnotherDlg
with ID - IDD_ANOTHERFORM
.
And there is ListBox
with a variable app_ListBox
.
In the main dialog, on clicking the button, I show the second dialog:
void CAppDlg::OnBnClickedButton1()
{
CAnotherDlg().DoModal();
}
ListBox
first dialog.void CAnotherDlg::OnBnClickedButton1()
{
CAppDlg dlg;
dlg.app_ListBox.AddItem(L"123");
// Так же пробовал добавить - dlg.DoModal();
}
ListBox
there is nothing. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question