C源码99
C源码Part One
MainFrm.h : interface of the CMainFrame class
#if !defined(AFX_GIMAINFRM_OO_GIH__B8C11B00_FA65_415F_8EA4_1B6CD73D457D_ _INCLUDED_)
#define
AFX_GIMAINFRM_OO_GIH__B8C11B00_FA65_415F_8EA4_1B6CD73D457D__INCLUDE D_
#if _MSC_VER > 1000
#pragma once
#endif _MSC_VER > 1000
#include "MyMenu.h"
#include "CustomTree.h"
#include "Capture_Process.h"
class CMainFrame : public CFrameWnd
{
protected: create from serialization only
CMainFrame();
DECLARE_DYNCREATE(CMainFrame)
Attributes
public:
Operations
public:
bool m_oo_gishowed; 判断是否捕捉视频
CMyMenu m_oo_gimenu;
HANDLE m_oo_gitreehandle;
CCustomTree m_oo_gitemptree;
CCapture_Main m_oo_gidisplay;
Overrides
ClassWizard generated virtual function overrides
{{AFX_GIVIRTUAL(CMainFrame)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual BOOL PreTranslateMessage(MSG pMsg);
protected:
virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext pContext);
}}AFX_GIVIRTUAL
Implementation
public:
void DBLCLick();
virtual ~CMainFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected: control bar embedded members
CStatusBar m_oo_giwndStatusBar;
CToolBar m_oo_giwndToolBar;
CTreeCtrl m_oo_gitreectrl;
CSplitterWnd m_oo_gisplitter;
CReBar m_oo_girebar;
CImageList m_oo_giimagelist;
CImageList m_oo_gitoolimages;
Generated message map functions
protected:
{{AFX_GIMSG(CMainFrame)
AFX_gimsg int OnCreate(LPCREATESTRUCT lpCreateStruct);
AFX_gimsg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
AFX_gimsg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
AFX_gimsg void OnSetdisPlay();
AFX_gimsg void OnMENUITEMEnd();
AFX_gimsg void OnPicpic();
AFX_gimsg void OnVideoCompress();
AFX_gimsg void OnSetdisFormat();
AFX_gimsg void OnSetdissorce();
AFX_gimsg void OnSize(UINT nType, int cx, int cy);
AFX_gimsg void OnCapture();
AFX_gimsg void OnMenuiautorun();
AFX_gimsg void OnMenuitemback();
AFX_gimsg void OnMenuitemrecord();
AFX_gimsg void OnMenuitemquery();
AFX_gimsg void OnMenuitemsysini();
AFX_gimsg void OnMenuitemrestore();
AFX_gimsg void OnDestroy();
AFX_gimsg void OnMenuitemhelp();
AFX_gimsg void OnLButtonDown(UINT nFlags, CPoint point);
AFX_gimsg void OnClose();
}}AFX_GIMSG
DECLARE_MESSAGE_MAP()
};
{{AFX_GIINSERT_LOCATION}}
Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif !defined(AFX_GIMAINFRM_OO_GIH__B8C11B00_FA65_415F_8EA4_1B6CD73D4 57D__INCLUDED_)
C源码Part Two
DialogUsers.cpp : implementation file
#include "stdafx.h"
#include "a1.h"
#include "DialogUsers.h"
#include "myfunction.h"
#include "Crypt.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
CDialogUsers dialog
CDialogUsers::CDialogUsers(CWnd pParent =NULL)
: CDialog(CDialogUsers::IDD, pParent)
{
{{AFX_GIDA TA_INIT(CDialogUsers)
NOTE: the ClassWizard will add member initialization here }}AFX_GIDA TA_INIT
}
void CDialogUsers::DoDataExchange(CDataExchange pDX)
{
CDialog::DoDataExchange(pDX);
{{AFX_GIDA TA_MAP(CDialogUsers)
DDX_Control(pDX, IDC_EDIT3, m_oo_gieditMM2);
DDX_Control(pDX, IDC_EDIT2, m_oo_gieditMM1);
DDX_Control(pDX, IDC_EDIT1, m_oo_gieditName);
DDX_Control(pDX, IDC_COMBO1, m_oo_gicomboPurview);
}}AFX_GIDA TA_MAP
}
BEGIN_MESSAGE_MAP(CDialogUsers, CDialog)
{{AFX_GIMSG_MAP(CDialogUsers)
}}AFX_GIMSG_MAP
END_MESSAGE_MAP()
CDialogUsers message handlers
BOOL CDialogUsers::OnInitDialog()
{
CDialog::OnInitDialog();
LRunSql m_oo_girunsql;
CString sql;
_variant_t value;
int i=0;
sql.Format("select from tabpurview");
if(!m_oo_girunsql.CheckSQLResult(sql))
{
this->EndDialog(0);
return false;
}
while(!m_oo_girunsql.m_oo_girecordset->adoEOF)
{
value=m_oo_girecordset->GetCollect("admi_purview");
this->m_oo_gicomboPureview.InsertString(i,(char)(_bstr_t)value);
m_oo_girunsql.m_oo_girecordset->MoveNext();
i++;
}
this->m_oo_gicomboPurview.InsertString(0,"超级用户");
this->m_oo_gicomboPurview.InsertString(1,"管理员");
this->m_oo_gicomboPurview.InsertString(2,"标准用户");
this->m_oo_gicomboPurview.InsertString(3,"一般用户");
this->m_oo_gicomboPurview.SetCurSel(3);
return TRUE; return TRUE unless you set the focus to a control
EXCEPTION: OCX Property Pages should return FALSE }
void CDialogUsers::OnOK()
{
HWND hwnd=this->GetFocus()->GetSafeHwnd();
if(hwnd==this->m_oo_gieditName.GetSafeHwnd())
{
this->m_oo_gieditMM1.SetFocus();
return;
}
else if(hwnd==this->m_oo_gieditMM1.GetSafeHwnd())
{
this->m_oo_gieditMM2.SetFocus();
return;
}
else if(hwnd==this->m_oo_gieditMM2.GetSafeHwnd())
{
this->m_oo_gicomboPurview.SetFocus();
return;
}
CString m_oo_gisNewPW1,m_oo_gisNewPW2;
this->m_oo_gieditMM1.GetWindowText(m_oo_gisNewPW1);
this->m_oo_gieditMM2.GetWindowText(m_oo_gisNewPW2);
LRunSql m_oo_girunsql;
CString sql;
CString name;
int purview=m_oo_gicomboPurview.GetCurSel();
this->m_oo_gieditName.GetWindowText(name);
if(name=="")
{
MessageBox("用户名不可为空");
m_oo_gieditName.SetFocus();
return;
}
if(m_oo_gisNewPW1!=m_oo_gisNewPW2)
{
MessageBox("请确认密码相同");
m_oo_gieditMM2.SetFocus();
return;
}
else
{
try{
sql.Format("select from tabpurview where admi_name = '%s'"
,name);
if(m_oo_girunsql.CheckSQLResult(sql))
{
MessageBox("请换一个用户名,该用户名已被注册");
return;
}
CString s_password=CCrypt::Encrypt(m_oo_gisNewPW2);
sql.Format("insert into tabpurview(admi_name,admi_password,admi_purview) values('%s','%s',%d)"
,name,s_password,purview);
m_oo_girunsql.RunSQL(sql);
}
catch(_com_oo_gierror& e)
{
AfxMessageBox(e.ErrorMessage());
return ;
}
MessageBox("成功添加新用户!","医药管理系统");
this->m_oo_gistrName=name;
this->m_oo_gicomboPurview.GetWindowText(m_oo_gistrPurview);
}
CDialog::OnOK();
}
C源码Part Three
Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
NOTE: Do not modify the contents of this file. If this class is regenerated by
Microsoft Visual C++, your modifications will be overwritten.
#include "stdafx.h"
#include "vcdatapoint.h"
Dispatch interfaces referenced by this interface
#include "vcdatapointlabel.h"
#include "vcbrush.h"
#include "VcPen.h"
#include "vcmarker.h"
CVcDataPoint properties
CVcDataPoint operations
CVcDataPointLabel CVcDataPoint::GetDataPointLabel()
{
LPDISPATCH pDispatch;
InvokeHelper(0x1, DISPA TCH_PROPERTYGET, VT_DISPATCH, (void)&pDispatch, NULL);
return CVcDataPointLabel(pDispatch);
}
CVcBrush CVcDataPoint::GetBrush()
{
LPDISPATCH pDispatch;
InvokeHelper(0x2, DISPA TCH_PROPERTYGET, VT_DISPATCH, (void)&pDispatch, NULL);
return CVcBrush(pDispatch);
}
CVcPen CVcDataPoint::GetEdgePen()
{
LPDISPATCH pDispatch;
InvokeHelper(0x3, DISPA TCH_PROPERTYGET, VT_DISPATCH, (void)&pDispatch, NULL);
return CVcPen(pDispatch);
}
CVcMarker CVcDataPoint::GetMarker()
{
LPDISPATCH pDispatch;
InvokeHelper(0x4, DISPA TCH_PROPERTYGET, VT_DISPATCH, (void)&pDispatch, NULL);
return CVcMarker(pDispatch);
}
float CVcDataPoint::GetOffset()
{
float result;
InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_R4, (void)&result, NULL);
return result;
}
void CVcDataPoint::SetOffset(float newValue)
{
static BYTE parms[] =
VTS_R4;
InvokeHelper(0x5, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
newValue);
}
void CVcDataPoint::ResetCustom()
{
InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
void CVcDataPoint::Select()
{
InvokeHelper(0x8, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}
C源码Part Four
#if !defined(AFX_GIDCOMPANY_H__DE003586_3708_4634_8AD5_085A32FED791__INCL UDED_)
#define
AFX_GIDCOMPANY_H__DE003586_3708_4634_8AD5_085A32FED791__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif _MSC_VER > 1000
DCompany.h : header file
#include "BaseEdit.h"
CDCompany dialog
class CDCompany : public CDialog
{
Construction
public:
void Display();
void Enabled(bool bEnabled);
CDCompany(CWnd pParent = NULL); standard constructor
Dialog Data
{{AFX_GIDA TA(CDCompany)
enum { IDD = IDD_COMPANY };
CButton m_oo_giButSave;
CButton m_oo_giButExit;
CButton m_oo_giButChange;
CBaseEdit m_oo_giEdtTel;
CBaseEdit m_oo_giEdtName;
CBaseEdit m_oo_giEdtMan;
CBaseEdit m_oo_giEdtAddr;
}}AFX_GIDA TA
Overrides
ClassWizard generated virtual function overrides
{{AFX_GIVIRTUAL(CDCompany)
protected:
virtual void DoDataExchange(CDataExchange pDX); DDXDDV support
}}AFX_GIVIRTUAL
Implementation
protected:
Generated message map functions
{{AFX_GIMSG(CDCompany)
virtual void OnOK();
virtual void OnCancel();
AFX_gimsg void OnButchange();
AFX_gimsg void OnButsave();
virtual BOOL OnInitDialog();
AFX_gimsg void OnButexit();
}}AFX_GIMSG
DECLARE_MESSAGE_MAP()
};
{{AFX_GIINSERT_LOCATION}}
Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif !defined(AFX_GIDCOMPANY_H__DE003586_3708_4634_8AD5_085A32FED791__I NCLUDED_)
C源码Part Five
#if !defined(AFX_GITRAINDLG_H__BA980502_96AE_4EB3_B5BD_CAD797CEDFBF__IN CLUDED_)
#define
AFX_GITRAINDLG_H__BA980502_96AE_4EB3_B5BD_CAD797CEDFBF__INCLUDED_ #if _MSC_VER > 1000
#pragma once
#endif _MSC_VER > 1000
TrainDlg.h : header file
CTrainDlg dialog
class CTrainDlg : public CDialog
{
Construction
public:
CTrainDlg(CWnd pParent = NULL); standard constructor
CBrush m_oo_gibrush_static;label
CBrush m_oo_gibrush_dlg;dlg
Dialog Data
{{AFX_GIDA TA(CTrainDlg)
enum { IDD = IDD_TRAIN_DLG };
CComboBox m_oo_gicbpxteacher;
CString m_oo_gistrpxcl;
CString m_oo_gistrpxpxlb;
CString m_oo_gistrpxteacher;
CTime m_oo_gitimepxdjrq;
CTime m_oo_gitimepxend;
CTime m_oo_gitimepxstart;
CString m_oo_gistrpxcx;
CString m_oo_gistrpxdjr;
CString m_oo_gistrpxid;
CString m_oo_gistrpxmark;
CString m_oo_gistrpxpxqs;
CString m_oo_gistrpxsc;
CString m_oo_gistrpxzjh;
CString m_oo_gistrpxname;
}}AFX_GIDA TA
Overrides
ClassWizard generated virtual function overrides
{{AFX_GIVIRTUAL(CTrainDlg)
protected:
virtual void DoDataExchange(CDataExchange pDX); DDXDDV support
}}AFX_GIVIRTUAL
Implementation
protected:
Generated message map functions
{{AFX_GIMSG(CTrainDlg)
AFX_gimsg void OnButtonPxSave();
virtual BOOL OnInitDialog();
AFX_gimsg void OnButtonPxLookfor();
AFX_gimsg HBRUSH OnCtlColor(CDC pDC, CWnd pWnd, UINT nCtlColor);
}}AFX_GIMSG
DECLARE_MESSAGE_MAP()
};
{{AFX_GIINSERT_LOCATION}}
Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif !defined(AFX_GITRAINDLG_H__BA980502_96AE_4EB3_B5BD_CAD797CEDFBF __INCLUDED_)