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

📄 tmainfrm3.cpp

📁 mpq文件的格式就是一种压缩格式
💻 CPP
字号:
/*****************************************************************************/
/* TMainFrm2.cpp                          Copyright (c) Ladislav Zezula 2003 */
/*---------------------------------------------------------------------------*/
/* Implementation of running MoPaq 2000 scripts                              */
/*---------------------------------------------------------------------------*/
/*   Date    Ver   Who  Comment                                              */
/* --------  ----  ---  -------                                              */
/* 18.04.03  1.00  Lad  The first version of TMainFrm2.cpp                   */
/*****************************************************************************/

#include "stdafx.h"
#include <conio.h>
#include "TMainFrm.h"
#include "TTreeView.h"
#include "TListView.h"
#include "TConsole.h"

//-----------------------------------------------------------------------------
// Script running

int TMainFrame::WTRunMPQ2000Script(char * szScript)
{
    TConsole * pConsole = NULL;
    RECT rect;
    int nError = ERROR_SUCCESS;

    // Create new console
    if(nError == ERROR_SUCCESS)
    {
        m_pListView->GetWindowRect(&rect);
        pConsole = new TConsole();
        nError = pConsole->CreateConsoleWindow(m_hWnd, rect);
    }

    // Set the working directory for the script or console
    SetCurrentDirectory(cfg.szWorkPath);

    if(nError == ERROR_SUCCESS)
    {
        m_hConsole = pConsole->GetWindow();

        if(szScript == NULL || *szScript == 0)
            pConsole->RunConsoleMode();
        else
        {
            // Perform the "script" command
            sprintf(pConsole->m_szCommand, "script \"%s\"", szScript);
            pConsole->RunCurrentCommand();
        }
    }
    return nError;
}

⌨️ 快捷键说明

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