Click here to Skip to main content
15,914,820 members

Comments by Member 8605996 (Top 4 by date)

Member 8605996 3-Dec-20 16:16pm View    
in my solution 3 I have a working version but it is not very efferent. How do I change solution 3 so that the budgetAmount and budgetNote are independent for each Budget[] index?
Member 8605996 8-Jan-15 12:43pm View    
I am able to do this now. Now I would like to send a structure to the child to initialize it. What is the best way to do this?
Member 8605996 7-Jan-15 9:38am View    
Have not been able to make you solution work.

I have made this modification to the section that starts my child dialog. Looked at pMainWnd and pView and they are pointing to the parent dialog. I created a global m_my_test in the parent. When I try and access m_my_test the compiler says it is undefined. How do I code it so it can be seen?

CUnpaidExpDlg::CUnpaidExpDlg(CWnd* pParent /*=NULL*/)
: CDialog(CUnpaidExpDlg::IDD, pParent)
{
CBudgetDlg *pMainWnd = (CBudgetDlg *)AfxGetMainWnd();
if (pMainWnd != NULL)
{
CWnd* pView = pMainWnd;
if(pView != NULL)
{
//my_string = m_my_test;
my_string = "Randy";
}
}

if(Create(CUnpaidExpDlg::IDD,pParent))
{

ShowWindow(SW_SHOW);
}
my_string = _T("");
}
Member 8605996 6-Jan-15 10:33am View    
For example if I have CString m_string in the parent dialog and I want to pass the value to the child dialog CString my_string. Here is what I am trying to do. Not sure how to code it.

CUnpaidExpDlg::CUnpaidExpDlg(CWnd* pParent /*=NULL*/)
: CDialog(CUnpaidExpDlg::IDD, pParent)
,my_string = CBudgetDlg.m_string;
{
if(Create(CUnpaidExpDlg::IDD,pParent))
{
ShowWindow(SW_SHOW);

}
}