📄 output.cpp
字号:
// Output.cpp : implementation file
//
#include "stdafx.h"
#include "My1.h"
#include "Output.h"
#include "MainFrm.h"
#include <fstream.h>
//#include "My1View.h"
//#include <afxwin.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// COutput
//class CMy1View;
COutput::COutput()
{
}
COutput::~COutput()
{
}
BEGIN_MESSAGE_MAP(COutput, CEdit)
//{{AFX_MSG_MAP(COutput)
ON_WM_LBUTTONDBLCLK()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// COutput message handlers
void COutput::OnLButtonDblClk(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
//MessageBox("you have dlf");
int x,xx,y,z;
char buff[1000];
char buf[10];
fstream outfile;
x=LineFromChar(-1);
SetFocus();
y=LineIndex(x);
z=LineIndex(x+1);
SetSel(y,z,false);
GetLine(x,buff,1000);
xx=0;
for(int i=10;;i++)
if(buff[i]>='0'&&buff[i]<='9')
xx=xx*10+buff[i]-'0';
else break;
sprintf(buf,"%d",xx-1);
outfile.open("c://MyData.txt",ios::out);
outfile<<buf;
outfile.close();
//CEdit::OnLButtonDblClk(nFlags, point);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -