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

📄 convertbmpview.h

📁 bmp_to_c.rar
💻 H
字号:
// convertBMPView.h : interface of the CConvertBMPView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_CONVERTBMPVIEW_H__25842A47_7378_4A54_88B8_BB93DA450E7F__INCLUDED_)
#define AFX_CONVERTBMPVIEW_H__25842A47_7378_4A54_88B8_BB93DA450E7F__INCLUDED_

#include "Cdib.H"	// Added by ClassView

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "afxtempl.h"

class CConvertBMPView : public CScrollView
{
protected: // create from serialization only
	CConvertBMPView();
	DECLARE_DYNCREATE(CConvertBMPView)

// Attributes
public:
	CConvertBMPDoc* GetDocument();
	bool ConvertBmp(CString szFileName,char *sError);
	char GetHex(BYTE bySrc,bool bFlag, int bitCount);

// Operations
public:
	CString fileName;

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

// Implementation
public:
	virtual ~CConvertBMPView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CConvertBMPView)
	afx_msg void OnFileOpen();
	afx_msg void OnEditConvert();
	afx_msg void OnEditAddtofile();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

private:
	CDib m_dibFile;
	CDib m_dibResource;

private:
    BOOL FindAllBMPFile(CArray<CString,CString>& file_name_array,CString csPath);
    bool ConvertBmp_single(CString csOpen,CString szFileName, char *sError);
    CString ParseFilePath(CString fullName);
    BOOL isBMPFile(CString fileName);
    CString RemoveFileTail(CString name);
    CString ParseFileName(CString fullName);

};

#ifndef _DEBUG  // debug version in convertBMPView.cpp
inline CConvertBMPDoc* CConvertBMPView::GetDocument()
   { return (CConvertBMPDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_CONVERTBMPVIEW_H__25842A47_7378_4A54_88B8_BB93DA450E7F__INCLUDED_)

⌨️ 快捷键说明

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