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
Convert a T-SQL query to JET SQL aka Possible ALIAS Problems.
IIS Anonymous User Password
How do I hide the splash screen on application load? VB.NET 2005
Why can't I see my vertical scrollbars in Access 2007 Form?
BESR VHD Error
Check box on sub form to select list items
ADSI Query (linked server) to get computer name and OU's
How to Pass (text) criteria to a query using a Multi List Box
minimum xp install
File System Error (-1073741701) When attempting to run or attempting to load Vista SP1