📄 mycommandlineinfo.cpp
字号:
// MyCommandLineInfo.cpp: implementation of the CMyCommandLineInfo class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "femme.h"
#include "MyCommandLineInfo.h"
#include "afxwin.h"
#include "lua.h"
extern lua_State * lua;
extern int m_luaWindowStatus;
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
extern CString luascriptname;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CMyCommandLineInfo::CMyCommandLineInfo()
{
m_luaWindowStatus=SW_SHOW; // default unless otherwise
}
CMyCommandLineInfo::~CMyCommandLineInfo()
{
}
void CMyCommandLineInfo::ParseParam (LPCTSTR lpszParam,BOOL bFlag,BOOL bLast )
{
CString theparam;
theparam.Format("%s",lpszParam);
theparam.MakeLower();
if(theparam.Left(11)=="lua-script=" && bFlag ==1)
{
luascriptname=theparam.Mid(11);
}
if (theparam=="windowhide" && bFlag==1)
{
m_luaWindowStatus=SW_MINIMIZE;
}
if (theparam.Left(8)=="lua-var=" && bFlag==1)
{
CString varname;
CString vardata;
for (int pos=8;pos<theparam.GetLength();pos++)
{
if (theparam.Mid(pos,1)=="=")
{
varname=theparam.Mid(8,pos-8);
vardata=theparam.Mid(pos+1,theparam.GetLength()-pos+1);
if(lua!=NULL)
{
lua_pushstring(lua,vardata);
lua_setglobal(lua,varname);
}
pos=theparam.GetLength()+1;
}
}
}
CCommandLineInfo::ParseParam(lpszParam,bFlag,bLast);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -