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

📄 myfiledailog1.cpp

📁 用jsp做的能够实现简单的短信息发送回复的短消息系统
💻 CPP
字号:
// MyFileDailog1.cpp : implementation file
//

#include "stdafx.h"
#include "DuanXin.h"
#include "MyFileDailog1.h"
#include "stdio.h"
#include  "string.h"

#include  "trim.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define TRIM(P)  bases_TrimBoth(P)

/////////////////////////////////////////////////////////////////////////////
// CMyFileDailog

IMPLEMENT_DYNAMIC(CMyFileDailog, CFileDialog)

CMyFileDailog::CMyFileDailog(BOOL bOpenFileDialog, LPCTSTR lpszDefExt, LPCTSTR lpszFileName,
		DWORD dwFlags, LPCTSTR lpszFilter, CWnd* pParentWnd) :
		CFileDialog(bOpenFileDialog, lpszDefExt, lpszFileName, dwFlags, lpszFilter, pParentWnd)
{
			
}


BEGIN_MESSAGE_MAP(CMyFileDailog, CFileDialog)
	//{{AFX_MSG_MAP(CMyFileDailog)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


void CMyFileDailog::Ok_Click()
{
	FILE *fp;
	char	File_Path[1024] = "\0"	;
	char	Read_Txt[1024]	="\0"	;

	this->Ok_Click()
	{
		
		strcpy(File_Path, ((LPCTSTR) this->GetFileName()));
		if(strlen(File_Path)==0)
		{
			AfxMessageBox("File name is null ");
			return ;
		}
		if((fp=fopen(File_Path,"r"))<0)
		{
			AfxMessageBox("File Open is error ");
			close(fp);
			return;
		}
		else
		{
			if(fgets(Read_Txt,1024,fp) !=  NULL)
			{
				TRIM(Read_Txt);
			//	Add_Mobile(Read_Txt);
			}
	
		}
		this->OnOk();
	}

}

⌨️ 快捷键说明

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