资源简介
金橙子EZcad3软件包
代码片段和文件信息
// D:\项目\EzCad3_VS2015\EzCad3_VS2015\DialogIssue.cpp : 实现文件
//
#include “stdafx.h“
#include “EzCad3_VS2015.h“
#include “DialogIssue.h“
#include “afxdialogex.h“
#include “qglobal.h“
// CDialogIssue 对话框
IMPLEMENT_DYNAMIC(CDialogIssue CDialogEx)
CDialogIssue::CDialogIssue(CWnd* pParent /*=NULL*/)
: CDialogEx(IDD_DIALOG_ISSUE pParent)
{
m_nMarkerId = 0;
}
CDialogIssue::~CDialogIssue()
{
}
void CDialogIssue::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CDialogIssue CDialogEx)
ON_BN_CLICKED(IDC_BUTTON_SAVETOFILE &CDialogIssue::OnBnClickedButtonSavetofile)
ON_BN_CLICKED(IDCANCEL &CDialogIssue::OnBnClickedCancel)
ON_BN_CLICKED(IDC_BUTTON_EMAIL &CDialogIssue::OnBnClickedButtonEmail)
END_MESSAGE_MAP()
#include “mapi.h“
// CDialogIssue 消息处理程序
void SendMail(CString strEmailAddressCString strSubjectCString strMsgCString strSenderCString strFile )
{
//装入MAPI32.DLL动态库
HMODULE hMod = LoadLibrary(_T(“MAPI32.DLL“));
if (hMod == NULL)
{
AfxMessageBox(AFX_IDP_FAILED_MAPI_LOAD);
return;
}
//获取发送邮件的函数地址
ULONG(PASCAL *lpfnSendMail)(ULONG ULONG MapiMessage* FLAGS ULONG);
(FARPROC&)lpfnSendMail = GetProcAddress(hMod “MAPISendMail“);
if (lpfnSendMail == NULL)
{
AfxMessageBox(AFX_IDP_INVALID_MAPI_DLL);
return;
}
char* pstrEmailAddress = QGlobal::gf_StrToCharDelBuf(strEmailAddress);
char* pstrSubject = QGlobal::gf_StrToCharDelBuf(strSubject);
char* pstrMsg = QGlobal::gf_StrToCharDelBuf(strMsg);
char* pstrSender = QGlobal::gf_StrToCharDelBuf(strSender);
char* pstrFile = QGlobal::gf_StrToCharDelBuf(strFile);
int nFileCount =1; //有多少个附件需要发送
//分配内存保存附件信息 不能使用静态数组,因为不知道要发送附件的个数
MapiFileDesc* pFileDesc = (MapiFileDesc*)malloc(sizeof(MapiFileDesc) * nFileCount);
memset(pFileDesc 0 sizeof(MapiFileDesc) * nFileCount);
//分配内存保存附件文件路径
TCHAR* pTchPath = (TCHAR*)malloc(MAX_PATH * nFileCount);
CString szText;
for (int i = 0; i < nFileCount; i++)
{
TCHAR* p = pTchPath + MAX_PATH * i;
(pFileDesc + i)->nPosition = (ULONG)-1;
(pFileDesc + i)->lpszPathName = pstrFile;
(pFileDesc + i)->lpszFileName = pstrFile;
}
//收件人结构信息
MapiRecipDesc recip;
memset(&recip 0 sizeof(MapiRecipDesc));
recip.lpszAddress = pstrEmailAddress;
recip.ulRecipClass = MAPI_TO;
recip.lpszName = pstrSender;
//邮件结构信息
MapiMessage message;
memset(&message 0 sizeof(message));
message.nFileCount = nFileCount; //文件个数
message.lpFiles = pFileDesc; //文件信息
message.nRecipCount = 1; //收件人个数
message.lpRecips = &recip; //收件人
message.lpszSubject = pstrSubject; //主题
message.lpszNoteText = pstrMsg; //正文内容
//保存本程序窗口指针,因为发完邮件后要返回本程序的窗口
CWnd* pParentWnd = CWnd::GetSafeOwner(NULL NULL);
//发送邮件
int nError = lpfnSendMail(0 0 &message MAPI_LOGON_UI | MAPI_DIALOG 0);
if (nError != SUCCESS_SUCCESS && nError != MAPI_USER_ABOR
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-11-21 07:34 EzCad3_VS2015-master\
文件 2518 2018-11-21 07:34 EzCad3_VS2015-master\.gitattributes
文件 4305 2018-11-21 07:34 EzCad3_VS2015-master\.gitignore
文件 6383 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015.sln
目录 0 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\
文件 5278 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\DialogIssue.cpp
文件 564 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\DialogIssue.h
文件 14792 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\EzCad3_VS2015.cpp
文件 1221 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\EzCad3_VS2015.h
文件 83096 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\EzCad3_VS2015.rc
文件 35942 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\EzCad3_VS2015.vcxproj
文件 36532 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\EzCad3_VS2015.vcxproj.filters
文件 5089 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\Ezcad3Doc.cpp
文件 1087 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\Ezcad3Doc.h
文件 8889 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\Ezcad3View.cpp
文件 2044 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\Ezcad3View.h
目录 0 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\LaserMonitor\
文件 3260 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\LaserMonitor\DlgLaserMonitor.cpp
文件 951 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\LaserMonitor\DlgLaserMonitor.h
文件 3112 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\LaserMonitor\DlgLaserMonitorFiber.cpp
文件 648 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\LaserMonitor\DlgLaserMonitorFiber.h
文件 2504 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\LaserMonitor\DlgLaserMonitorQcw.cpp
文件 598 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\LaserMonitor\DlgLaserMonitorQcw.h
文件 2100 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\LaserMonitor\DlgLaserMonitorSpi.cpp
文件 600 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\LaserMonitor\DlgLaserMonitorSpi.h
文件 2044 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\LaserMonitor\DlgLaserMonitorYag.cpp
文件 622 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\LaserMonitor\DlgLaserMonitorYag.h
文件 1499 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\LaserMonitor\LaserMonitorPanel.cpp
文件 467 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\LaserMonitor\LaserMonitorPanel.h
文件 41594 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\MainFrm.cpp
文件 16103 2018-11-21 07:34 EzCad3_VS2015-master\EzCad3_VS2015\MainFrm.h
............此处省略436个文件信息
- 上一篇:C#数字键盘
- 下一篇:winform开发的人脸识别打卡系统
相关资源
- CAD图框外扩
- C# SCADA源码修复
- C# Cad2006二次开发之图形扩展属性读写
- C#开发 CAD 编程基础
- C# CAD 创建Ribbon菜单带图标
- C#读取DXF文件并显示dxf转hpgl
- 基于C#.NET的Autocad二次开发范例
- C#_PISDK快速高效率采集SCADA数据点
- C#等高线追踪
- C#语言操作 CAD二次开发
- 完整《基于Visual C#的AutoCAD 开发 及其
- AUTOCAD C#二次开发
- C#语言操作ActiveX_automation CAD二次开发
- CadLib4.0 Cad类库
- SharpScada组态软件
- C#解析CAD文件
- 深居浅出AutoCAD二次开发
- DWGdirect.NET文档说明C# 读写CAD文件DWG格
- C#二次开发CAD
- Teigha 各版本使用汇总
- AUTOCAD VBA&VB;.NET开发基础与教程第二版
- DWGdirect_NET文档说明C# .NET读写CAD文件
- AutoCAD VBA&VB;.NET开发基础与教程 C# PD
- 用C#编写的完整的CAD源码对于初学者很
- c#操作CAD实时打开关闭
- C#开发交互式CAD系统
- C#开发cad画图软件 GDI+
- C# CAD画图软件
- C#实现的读取CAD表格文字
- C#实现CAD绘图功能
评论
共有 条评论