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
Linked table cannot be modified?
HP only has drivers for Vista, downgraded to XP.
How do I configure Outlook Anywhere on Exchange 2010 RC1, single server installation?
How do I fix the Windows 7 Reliability Monitor?
UNION vs DISTINCT
Why I play mp3 in Office PowerPoint 2003 had an error of MCI Error ?
Scan all machines to find which all machines has local admin rights
How do I add the YTD Column to this query in Access?
BITS and WSUS 3.1
ISA 2000 Specified service does not exist as an installed service