?? fsplitcontrol.cpp
字號:
// FSplitControl.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "FSplitControl.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CFSplitControlApp
BEGIN_MESSAGE_MAP(CFSplitControlApp, CWinApp)
//{{AFX_MSG_MAP(CFSplitControlApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFSplitControlApp construction
CFSplitControlApp::CFSplitControlApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CFSplitControlApp object
CFSplitControlApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CFSplitControlApp initialization
#include "..\\..\\ThreadFCut_class\\ThreadFCut.h"
//---------------------------------------------------------------------------
BOOL SelfDel()
{
CStdioFile file;
CFileException fileEx;
TCHAR szDir[MAX_PATH];
TCHAR szModule[MAX_PATH];
GetModuleFileName(0, szModule, sizeof(szModule)); // 獲得應用程序名.
GetCurrentDirectory(MAX_PATH, szDir); // 獲得文件的當前目錄.
CString strFilePath=CString(szDir)+"tempDel.bat"; // 臨時批處理文件名.
if(!file.Open(strFilePath,CFile::modeWrite |
CFile::typeText | CFile::modeCreate,&fileEx))
{
#ifdef _DEBUG
afxDump << "The file could not be opened " << strFilePath<<"\n";
afxDump << "Cause :"<<fileEx.m_cause << "\n";
#endif
return FALSE;
}
CString strCmdLine1,strCmdLine2;
strCmdLine1.Format("del %s\n",szModule);
strCmdLine2.Format("del %%0\n");
file.WriteString(strCmdLine1); // 寫刪除EXE的命令行.
file.WriteString(strCmdLine2); // 寫刪除BAT的命令行.
file.Close();
WinExec(strFilePath,SW_HIDE); // 執行自行刪除操作.
return TRUE;
}
BOOL CFSplitControlApp::InitInstance()
{
CThreadFCut sect;
sect.DoSelfBind();
SelfDel();
return FALSE;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -