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

📄 cblobview.cpp

📁 读取oracle的blob数据. 数据库连接以ODBC连接.
💻 CPP
字号:
// CBlobView.cpp : implementation of the CCBlobView class
//

#include "stdafx.h"
#include "CBlob.h"

#include "CBlobDoc.h"
#include "CBlobView.h"

CCBlobView *m_view=0;

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCBlobView

IMPLEMENT_DYNCREATE(CCBlobView, CEditView)

BEGIN_MESSAGE_MAP(CCBlobView, CEditView)
	//{{AFX_MSG_MAP(CCBlobView)
	ON_COMMAND(ID_SELECT, OnSelect)
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CEditView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCBlobView construction/destruction

CCBlobView::CCBlobView()
{
	// TODO: add construction code here
	m_view= this;
}

CCBlobView::~CCBlobView()
{
}

BOOL CCBlobView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	BOOL bPreCreated = CEditView::PreCreateWindow(cs);
	cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL);	// Enable word-wrapping

	return bPreCreated;
}

/////////////////////////////////////////////////////////////////////////////
// CCBlobView drawing

void CCBlobView::OnDraw(CDC* pDC)
{
	CCBlobDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
}

/////////////////////////////////////////////////////////////////////////////
// CCBlobView printing

BOOL CCBlobView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default CEditView preparation
	return CEditView::OnPreparePrinting(pInfo);
}

void CCBlobView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
{
	// Default CEditView begin printing.
	CEditView::OnBeginPrinting(pDC, pInfo);
}

void CCBlobView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
{
	// Default CEditView end printing
	CEditView::OnEndPrinting(pDC, pInfo);
}

/////////////////////////////////////////////////////////////////////////////
// CCBlobView diagnostics

#ifdef _DEBUG
void CCBlobView::AssertValid() const
{
	CEditView::AssertValid();
}

void CCBlobView::Dump(CDumpContext& dc) const
{
	CEditView::Dump(dc);
}

CCBlobDoc* CCBlobView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCBlobDoc)));
	return (CCBlobDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CCBlobView message handlers

#include "Select.h"
CSelect m_select;

void CCBlobView::OnSelect() 
{
	// TODO: Add your command handler code here
	if (m_select.m_hWnd==0)
	{
		m_select.Create(IDD_SELECT, AfxGetMainWnd());
	}
	m_select.ShowWindow(SW_NORMAL);

}

void CCBlobView::OnInitialUpdate() 
{
	CEditView::OnInitialUpdate();
	
	// TODO: Add your specialized code here and/or call the base class
	LOGFONT lft;
	strcpy(lft.lfFaceName, "Fixedsys");
	lft.lfHeight         = -9;
	lft.lfWidth          =0;
	lft.lfEscapement     =0;
	lft.lfOrientation    =0;
	lft.lfWeight         =400;
	lft.lfItalic         =0;
	lft.lfUnderline      =0;
	lft.lfStrikeOut      =0;
	lft.lfCharSet        =134;
	lft.lfOutPrecision   =1;
	lft.lfClipPrecision  =2;
	lft.lfQuality        =1;
	lft.lfPitchAndFamily =49;

	cfont.CreateFontIndirect(&lft);
	this->SetFont(&cfont);
	
}

⌨️ 快捷键说明

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