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
CString in fprintf
Copy worksheets to new workbook
Access 2003 NOT IN (select subquery) doesn't work
Select Missing Rows From Table (Determination Made Based on Multiple Columns)
How to have setup.exe install a file into sytems32\drivers?
Any SQL to LINQ converters out there?
how to change multiple check box in query
SBS 2003 hangs will setting up personalized settings for Internet Explorer after IE7 upgrade
Add Trusted Sites to all domain users via GPO...
How to see JPG files on a form as I see BMP files