="justify">//NOTE: the ClassWizard will add member initialization here
//}} AFX_DATA_INIT
//TODO: add construction code here
} View :: ~ CVar6View ()
{
}
void CVar6View :: DoDataExchange (CDataExchange * pDX)
{:: DoDataExchange (pDX);
//{{AFX_DATA_MAP (CVar6View) _Control (pDX, IDC_LIST1, m_l);
//}} AFX_DATA_MAP
}
BOOL CVar6View :: PreCreateWindow (CREATESTRUCT amp; cs)
{
//TODO: Modify the Window class or styles here by modifying
//the CREATESTRUCT csCFormView :: PreCreateWindow (cs);
} CVar6View :: OnInitialUpdate ()
{:: OnInitialUpdate (); (); Doc * pDoc=GetDocument () ;. Copy (pDoc- gt; list); _ l.ResetContent (); (int i=0; i lt; list.GetSize (); i ++)
{_ l.InsertString (i, list.GetAt (i));
}
//CMainFrame * pFrame=(CMainFrame *) AfxGetApp () - gt; m_pMainWnd- gt; GetActiveWindow ();
//pFrame- gt; SetSbText (pDoc- gt; GetTitle ());
}
/////////////////////////////////////////////////////////////////////////////
//CVar6View diagnostics
# ifdef _DEBUGCVar6View :: AssertValid () const
{:: AssertValid ();
}
void CVar6View :: Dump (CDumpContext amp; dc) const
{:: Dump (dc);
}
CVar6Doc * CVar6View :: GetDocument ()//non-debug version is inline
{(m_pDocument- gt; IsKindOf (RUNTIME_CLASS (CVar6Doc))); (CVar6Doc *) m_pDocument;
}
# endif//_ DEBUG
/////////////////////////////////////////////////////////////////////////////
//CVar6View message handlersCVar6View :: OnAdd ()
{
//TODO: Add your control notification handler code hereDoc * pDoc=GetDocument (); (pDoc- gt; GetTitle () == Products )
{productDlg; .DoModal (); ((productDlg.m_productname!= ) amp; amp; (productDlg.m_productcena!= ))
{ gt; list.Add ( Виріб: + productDlg.m_productname + laquo ;, Ціна: + productDlg.m_productcena); gt; SetModifiedFlag (TRUE);
}
} (pDoc- gt; GetTitle () == Clients )
{clientDlg; .DoModal (); (clientDlg.m_name!= )
{ gt; list.Add (clientDlg.m_name); gt; SetModifiedFlag (TRUE);
}
} (pDoc- gt; GetTitle () == Tickets )
{ticketDlg; .DoModal ();
if ((ticketDlg.m_client!= ) amp; amp; (ticketDlg.m_product!= ))
{ gt; list.Add ( Клієнт: + ticketDlg.m_client + laquo ;, + ticketDlg.m_product); gt; SetModifiedFlag (TRUE);
}
} ();
} CVar6View :: OnDelete ()
{
//TODO: Add your control notification handler code hereDoc * pDoc=GetDocument (); index=m_l.GetCurSel (); (index gt;=0)
{ gt; list.RemoveAt (index, 1); gt; SetModifiedFlag (TRUE);
} ();
}
Var6View.h
//var6View.h: interface of the CVar6View class
//
/////////////////////////////////////////////////////////////////////////////
# if! defined (AFX_VAR6VIEW_H__E7C3E0C9_B192_410D_A7AC_F227B9013406__INCLUDED _)
# define AFX_VAR6VIEW_H__E7C3E0C9_B192_410D_A7AC_F227B9013406__INCLUDED _
# if _MSC_VER gt; 1000
# pragma once
# endif//_MSC_VER gt; 1000CVar6View: public CFormView
{://create from serialization onlyView (); _ DYNCREATE (CVar6View):
//{{AFX_DATA (CVar6View) {IDD=IDD_VAR6_FORM}; _ l;
//}} AFX_DATA
//Attributes: Doc * GetDocument (); list;
//Operations:
//Overrides
//ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL (CVar6View): BOOL PreCreateWindow (CREATESTRUCT amp; cs) ;: void DoDataExchange (CDataExchange * pDX);// DDX/...