📄 mydlgdelname.cpp
字号:
// MyDlgDelName.cpp : implementation file
//
#include "stdafx.h"
#include "myprinter.h"
#include "MyDlgDelName.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMyDlgDelName property page
IMPLEMENT_DYNCREATE(CMyDlgDelName, CPropertyPage)
CMyDlgDelName::CMyDlgDelName() : CPropertyPage(CMyDlgDelName::IDD)
{
EnableAutomation();
//{{AFX_DATA_INIT(CMyDlgDelName)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
HRESULT hr;
//初始化连接指针
CoInitialize(NULL);
hr=p_connection.CreateInstance(_uuidof(Connection));
if(FAILED(hr))
{
CWnd::MessageBox ("_ConnectionPtr初始化错误!");
}
//初始化recordset指针
hr=p_recordset.CreateInstance(_uuidof(Recordset));
if(FAILED(hr))
{
CWnd::MessageBox ("_RecordsetPtr初始化错误!");
}
}
CMyDlgDelName::~CMyDlgDelName()
{
}
void CMyDlgDelName::OnFinalRelease()
{
// When the last reference for an automation object is released
// OnFinalRelease is called. The base class will automatically
// deletes the object. Add additional cleanup required for your
// object before calling the base class.
CPropertyPage::OnFinalRelease();
}
void CMyDlgDelName::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMyDlgDelName)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMyDlgDelName, CPropertyPage)
//{{AFX_MSG_MAP(CMyDlgDelName)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BEGIN_DISPATCH_MAP(CMyDlgDelName, CPropertyPage)
//{{AFX_DISPATCH_MAP(CMyDlgDelName)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()
// Note: we add support for IID_IMyDlgDelName to support typesafe binding
// from VBA. This IID must match the GUID that is attached to the
// dispinterface in the .ODL file.
// {E61A26CE-7272-4229-B742-0E0D63ACEC90}
static const IID IID_IMyDlgDelName =
{ 0xe61a26ce, 0x7272, 0x4229, { 0xb7, 0x42, 0xe, 0xd, 0x63, 0xac, 0xec, 0x90 } };
BEGIN_INTERFACE_MAP(CMyDlgDelName, CPropertyPage)
INTERFACE_PART(CMyDlgDelName, IID_IMyDlgDelName, Dispatch)
END_INTERFACE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMyDlgDelName message handlers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -