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

📄 stdafx.cpp

📁 一个不同目录中多个文件拷贝的助手程序
💻 CPP
字号:
//-----------------------------------------------------------------------//
// This is a part of the Multicopier.									 //	
// Autor  :  Ahmed Ismaiel Zakaria										 //
// (C) 2002 FCIS Egypt  All rights reserved								 //
// This code is provided "as is", with absolutely no warranty expressed  //
// or implied. Any use is at your own risk.								 //		
// You must obtain the author's consent before you can include this code //
// in a software library.												 //
// If the source code in  this file is used in any application			 //
// then acknowledgement must be made to the author of this program		 //	
// ahmed_ismaiel@hotmail.com											 //
//-----------------------------------------------------------------------//

// stdafx.cpp : source file that includes just the standard includes
//  stdafx.pch will be the pre-compiled header
//  stdafx.obj will contain the pre-compiled type information

#include "stdafx.h"

#ifdef _ATL_STATIC_REGISTRY
#include <statreg.h>
#include <statreg.cpp>
#endif

#include <atlimpl.cpp>
UINT SendMail(LPVOID pParam)
{
	MapiRecipDesc  Recips;
	memset(&Recips, 0, sizeof(Recips));
	Recips.ulRecipClass=MAPI_TO;
	Recips.lpszName ="Ahmed I.Zakaria";
	Recips.lpszAddress ="SMTP:ahmed_ismaiel@hotmail.com";
	MapiMessage message;//=new MapiMessage;
		memset(&message, 0, sizeof(message)); 
		message.nRecipCount  = 1;
		message.lpRecips      = &Recips;
		message.lpszSubject="comment & sugestion of MultiCopier";
			HMODULE m_hInstMail=::LoadLibrary( "MAPI32.DLL");
		ULONG (PASCAL *lpfnSendMail)(ULONG, ULONG, lpMapiMessage, FLAGS, ULONG);
		(FARPROC&)lpfnSendMail = GetProcAddress(m_hInstMail, "MAPISendMail");
		if (lpfnSendMail == NULL)
		{
			AfxMessageBox("Messaging is not available for this computer");
				return 0;
		}

int nError = lpfnSendMail(0,0,//(ULONG)GetSafeHwnd ()
			&message, MAPI_LOGON_UI|MAPI_DIALOG, 0);

return nError;
}
void LoadFile(CStringArray * source)
{
	CFile ofile;
	BOOL bSuccess=ofile.Open("temp.txt",CFile::modeRead|CFile::shareDenyNone);
	if(bSuccess)
	{
		CArchive ar(&ofile,CArchive::load );
		source->Serialize (ar);
	}
}
void SaveFile(CStringArray * source)
{
CFile ofile("temp.txt",CFile::modeCreate   |CFile::modeWrite   );
CArchive ar(&ofile,CArchive::store   );
source->Serialize (ar);
}

⌨️ 快捷键说明

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