home *** CD-ROM | disk | FTP | other *** search
- // FormCateg.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "DBTest.h"
- #include "FormCateg.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CFormCateg
-
- IMPLEMENT_DYNCREATE(CFormCateg, CDBForm)
-
- CFormCateg::CFormCateg()
- : CDBForm(CFormCateg::IDD)
- {
- //{{AFX_DATA_INIT(CFormCateg)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
-
- CFormCateg::~CFormCateg()
- {
- }
-
- void CFormCateg::DoDataExchange(CDataExchange* pDX)
- {
- CDBForm::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CFormCateg)
- // NOTE: the ClassWizard will add DDX and DDV calls here
- //}}AFX_DATA_MAP
- }
-
-
- BEGIN_MESSAGE_MAP(CFormCateg, CDBForm)
- //{{AFX_MSG_MAP(CFormCateg)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CFormCateg diagnostics
-
- #ifdef _DEBUG
- void CFormCateg::AssertValid() const
- {
- CDBForm::AssertValid();
- }
-
- void CFormCateg::Dump(CDumpContext& dc) const
- {
- CDBForm::Dump(dc);
- }
- #endif //_DEBUG
-
- /////////////////////////////////////////////////////////////////////////////
- // CFormCateg message handlers
-
- void CFormCateg::OnInitialUpdate()
- {
- OpenCursor( "SELECT * FROM [Categ]");
- AddEditCtrl( IDC_EDIT_ID, "IdCateg", FLAG_EDIT_R_ONLY);
- AddEditCtrl( IDC_EDIT_DESC, "Desc");
-
- CDBForm::OnInitialUpdate();
- }
-