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

📄 usingblobdoc.cpp

📁 能够在数据库中存取大的二进制块
💻 CPP
字号:
// UsingBlobDoc.cpp : implementation of the CUsingBlobDoc class
//

#include "stdafx.h"
#include "UsingBlob.h"

#include "UsingBlobDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CUsingBlobDoc

IMPLEMENT_DYNCREATE(CUsingBlobDoc, CDocument)

BEGIN_MESSAGE_MAP(CUsingBlobDoc, CDocument)
	//{{AFX_MSG_MAP(CUsingBlobDoc)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CUsingBlobDoc construction/destruction

CUsingBlobDoc::CUsingBlobDoc()
{
	// TODO: add one-time construction code here

}

CUsingBlobDoc::~CUsingBlobDoc()
{
}

/////////////////////////////////////////////////////////////////////////////
// CUsingBlobDoc diagnostics

#ifdef _DEBUG
void CUsingBlobDoc::AssertValid() const
{
	CDocument::AssertValid();
}

void CUsingBlobDoc::Dump(CDumpContext& dc) const
{
	CDocument::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CUsingBlobDoc commands

BOOL CUsingBlobDoc::OnOpenDocument(LPCTSTR lpszPathName) 
{
	if (!CDocument::OnOpenDocument(lpszPathName))
		return FALSE;
	
    HBITMAP hbm = (HBITMAP)::LoadImage(NULL,
                                       lpszPathName,
                                       IMAGE_BITMAP,
                                       0,
                                       0,
                                       LR_LOADFROMFILE);

    if  (m_Image.Attach(hbm))
    {
        BITMAP  bm;
        m_Image.GetBitmap(&bm);
        m_Image.SetBitmapDimension(bm.bmWidth,bm.bmHeight);
        return TRUE;
    }

    return FALSE;
}

⌨️ 快捷键说明

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