tify">. cpp
# include stdafx.h
# include kursovaya.h
# include dlg.h
# include kursovayaDoc.h
# ifdef _DEBUG
# define new DEBUG_NEW
# undef THIS_FILEchar THIS_FILE []=__FILE __;
# endif_DYNCREATE (CKursovayaDoc, CDocument) _MESSAGE_MAP (CKursovayaDoc, CDocument)
//{{AFX_MSG_MAP (CKursovayaDoc) _COMMAND (ID_DDD, OnDdd)
//}} AFX_MSG_MAP_MESSAGE_MAP () :: CKursovayaDoc ()
{(NULL);=0;=0; (pConn.CreateInstance ( ADODB.Connection ))
{= 0;
:: MessageBox (0, Чи не виконана ініціалізація Connection , Помилка !!! , MB_ICONINFORMATION); ;
} gt; ConnectionTimeout=15000; gt; CommandTimeout=15000; gt; CursorLocation=adUseClient; gt; Mode=adModeReadWrite; (pRecordset.CreateInstance (L ADODB.RecordSet ))
{
:: MessageBox (0, Чи не виконана ініціалізація Recordset , !!!! Помилка !!! , MB_ICONINFORMATION);.Release ();=0;=0;
}= raquo ;;= raquo ;; (pConn == 0) return;
} :: ~ CKursovayaDoc ()
{
} CKursovayaDoc :: ErrMessage (_com_error amp; ce)
{err= raquo ;; += n raquo ;; += Source: raquo ;; += n raquo ;;
:: MessageBox (0, err, ?????? !!! , MB_ICONINFORMATION);
} CKursovayaDoc :: OnNewDocument ()
{(! CDocument :: OnNewDocument ()) FALSE;
//TODO: add reinitialization code here
//(SDI documents will reuse this document) TRUE;
}
//CKursovayaDoc serializationCKursovayaDoc :: Serialize (CArchive amp; ar)
{(ar.IsStoring ())
{
//TODO: add storing code here
}
{
//TODO: add loading code here
}
}
//CKursovayaDoc diagnostics
# ifdef _DEBUGCKursovayaDoc :: AssertValid () const
{:: AssertValid ();
} CKursovayaDoc :: Dump (CDumpContext amp; dc) const
{:: Dump (dc);
}
# endif//_ DEBUGCKursovayaDoc :: OnDdd ()
{dlg; .Doc=this; .pConn=pConn; .pRecordset=pRecordset; .DoModal ();
}
Додаток J
. cpp
# include stdafx.h
# include kursovaya.h
# include Grafik.h
# include MainFrm.h
# include Dlg.h
# include MainFrm.h
# include lt; windows.h gt;
# ifdef _DEBUG
# define new DEBUG_NEW
# undef THIS_FILEchar THIS_FILE []=__FILE __;
# endif_DYNCREATE (Grafik, CFrameWnd) :: Grafik ()
{[0]=0x0000000L; colorArray [1]=0x0AFAFAFL; [2]=0x0FF0000L; colorArray [3]=0x000FF00L; [4]=0x00000FFL; colorArray [5]=0x0FFFF00L; [6]=0x000FFFFL;
} :: ~ Grafik ()
{
//((CMainFrame *) AfxGetMainWnd ()) - gt; graf=0;
} _ MESSAGE_MAP (Grafik, CFrameWnd)
//{{AFX_MSG_MAP (Grafik) _WM_CREATE () _ WM_PAINT () _ WM_SIZE ()
//}} AFX_MSG_MAP_MESSAGE_MAP ()
//Grafik message handlersGrafik :: Init_3d ()
{; pixelformat; * pp=(CMainFrame *) AfxGetMainWnd ();
//if ((pixelformat=ChoosePixelFormat (GetDC () - gt; GetSafeHdc (), amp; (pp- gt; pfd))) == 0 ||
//SetPixelFormat (GetDC () - gt; GetSafeHdc (), pixelformat, amp; pp- gt; pfd) == FALSE)
//return false; ((pixelformat=ChoosePixelFormat (GetDC () - gt; GetSafeHdc (), amp; (pp- gt; pfd))) == 0 || (GetDC () - gt; GetSafeHdc (), pixelformat, amp; pp- gt; pfd) == FALSE) false;
:: DescribePixelFormat (GetDC () - gt; GetSafeHdc (), pixelformat, sizeof (pp- gt; pfd), amp; (pp- gt; pfd)); (pp- gt; pfd.cColorBits lt; 16) return false; hrc=wglCreateContext (GetDC () - gt; GetSafeHdc ()); (GetDC () - gt; GetSafeHdc (), hrc); (GL_DEPTH_TEST); true;
} Grafik :: PreCreat...