⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 generatorview.h

📁 一个条形码识别的源程序代码
💻 H
字号:
// GeneratorView.h : interface of the CGeneratorView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_GENERATORVIEW_H__CFE9E61A_6ABD_44A1_B3EF_28C4151A3BF5__INCLUDED_)
#define AFX_GENERATORVIEW_H__CFE9E61A_6ABD_44A1_B3EF_28C4151A3BF5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
 
class CGeneratorView : public CView
{
protected: // create from serialization only
	CGeneratorView();
	DECLARE_DYNCREATE(CGeneratorView)

// Attributes
public:
	CGeneratorDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CGeneratorView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	void DrawNumber(CDC *ptDC);
	void ToChar(int no,char &c);
	void DrawEnd(CDC *ptDC);
	void DrawRight(CDC *ptDC);
	void DrawMiddle(CDC *ptDC);
	void DrawLeft(CDC *ptDC);
	void DrawOne(CDC *ptDC,CPoint point,BOOL b_long);
	void DrawZero(CDC *ptDC,CPoint point);
	void DrawStart(CDC *ptDC);
	int CheckBit();
	void BldSecondTable();
	void BldFirstTable();
	virtual ~CGeneratorView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif
private:
	CBitmap *pBitmap;

	int picWidth;
	int picHeight;
	int lineWidth;
	int shortLine;
	int longLine;

	BOOL m_bModified;

	int code[13];
	CMapStringToString coderule;
	CString firstcode[10];
protected:

// Generated message map functions
protected:
	CDC *dcMem;
	//{{AFX_MSG(CGeneratorView)
	afx_msg void OnEditGive();
	afx_msg void OnFileSave();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in GeneratorView.cpp
inline CGeneratorDoc* CGeneratorView::GetDocument()
   { return (CGeneratorDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_GENERATORVIEW_H__CFE9E61A_6ABD_44A1_B3EF_28C4151A3BF5__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -