Microsoft
Software
Hardware
Network
Question : How to get variable value in domodal dailog?
Hi,
I have a dailog based application( mydlg1), in the button click of the mydlg1 I am doing domodal() for second dialog(say secdlg). suppose in the button click event of second dialog I want to access the public variable of main dialog (ie mydlg1), How can I do it please tell me.
Answer : How to get variable value in domodal dailog?
CMyDlg1::OnClick()
{
CMyDlg2 dlg( this ); <--- pass dlg1 as parent for dlg2
dlg.DoModal();
}
CMyDlg2::OnClick()
{
// get the pointer to the first dlg
CMyDlg1* pDlg1 = (CMyDlg1*)GetParent();
// access public members:
pDlg1->m_public = xxx;
}
Random Solutions
msxml3.dll is not able to be registered
Custom Icons on Toolbar- how to? Access 2000
TSQL: How to plug Nulls with Lookup values in same column and limited keys
Exporting to pdf from crystal reports stopped working
Exchange 2010 After install when initialising it looks for the DC not the member server
Combing MS SQL Select statement
.pdb file
Designing a new Application in C# from the ground up - Windows Forms or WPF? Custom Data Classes or Built in Data Classes?
Pivot Table control in C-Sharp
Moving a Certificate Authority (CA) to another DC with different name