📄 mpqeditor.h
字号:
/*****************************************************************************/
/* MPQEditor.h Copyright (c) Ladislav Zezula 2003 */
/*---------------------------------------------------------------------------*/
/* Header file for MPQ Editor application */
/*---------------------------------------------------------------------------*/
/* Date Ver Who Comment */
/* -------- ---- --- ------- */
/* 03.04.03 1.00 Lad The first version of MPQEditor.h */
/*****************************************************************************/
#ifndef __MPQEDITOR_H__
#define __MPQEDITOR_H__
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
//-----------------------------------------------------------------------------
// MPQEditor - specific messages
#define WM_SETSTATUSTEXT (WM_USER + 0x1000)
#define WM_WORKCOMPLETE (WM_USER + 0x1001)
#define WM_LOADARCHIVE (WM_USER + 0x1002)
#define WM_NAMEFOUND (WM_USER + 0x1003)
#define WM_SYSTRAYEVENT (WM_USER + 0x1004)
#define SYSTRAY_ICON_ID 0xF00D
//-----------------------------------------------------------------------------
// Information about file in MPQ archive
#define FILE_TYPE_DATA 0 // The file is a data file
#define FILE_TYPE_WAVE 1 // The file is a wave file
union TExt
{
char szExt[4];
DWORD dwExt;
};
struct TAddFlags
{
TExt Ext; // Four letter extension ("???" = default filetype)
int nFileType; // 0 - Data file, 1 - Wave file
int nCompression; // Data/Wave compression
BOOL bEncrypt; // If TRUE, we will encrypt the file
};
struct TConfiguration
{
// Options
char szWorkPath[MAX_PATH]; // Working directory
char szFileListsPath[MAX_PATH]; // Path for the file lists
char szLastMpqPath[MAX_PATH]; // Path where the last MPQ was opened from
BOOL bUseStorm; // Use Storm.dll for read operations
BOOL bMinToSystray; // If TRUE, minimize to system tray
BOOL bRunFirstTime; // If TRUE, MPQ Editor runs first time on this system
// ArchivingOptions
TAddFlags * pAddFlags; // Flags each added file type
int nAddFlags; // Number of flags entries
LCID lcLocale; // Locale ID of added files
BOOL bShowOptionsOnAdd; // TRUE = Show archiving options when adding files
// Name Breaker
char szLastTriedName[MAX_PATH]; // Last tried name for name breaker
BOOL bAutoSave; // If TRUE, all found names will be saved
// WindowPos
RECT rectMainWnd;
int nShowCommand;
};
struct TFileInfo
{
char * szPlainName;
LCID lcLocale;
DWORD dwFileSize;
DWORD dwAttributes;
BOOL bDeleted; // TRUE if the file was deleted from archive
char szFullName[1];
};
//-----------------------------------------------------------------------------
// Global variables
extern TConfiguration cfg; // Application configuration
//-----------------------------------------------------------------------------
// TMPQEditorApp : See MPQEditor.cpp for the implementation of this class
class TMainFrame;
class TMPQEditorApp : public CWinApp
{
public:
TMPQEditorApp();
void OpenRecentDocument(int nIndex);
protected:
TMainFrame * CreateMainWindow(int nCmdShow);
void LoadAddFlags();
void LoadConfiguration();
void SaveConfiguration();
void ParseCmdLine();
void RegisterMPQEditor();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(TMPQEditorApp)
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(TMPQEditorApp)
afx_msg void OnFileMRUFile1();
afx_msg void OnFileMRUFile2();
afx_msg void OnFileMRUFile3();
afx_msg void OnFileMRUFile4();
afx_msg void OnAppAbout();
afx_msg void OnHelpCmdLine();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif // __MPQEDITOR_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -