mymessages.cpp
来自「7-Zip 是一款号称有着现今最高压缩比的压缩软件」· C++ 代码 · 共 59 行
CPP
59 行
// MyMessages.cpp
#include "StdAfx.h"
#include "MyMessages.h"
#include "Windows/Error.h"
#include "Windows/ResourceString.h"
#ifdef LANG
#include "../FileManager/LangUtils.h"
#endif
using namespace NWindows;
void ShowErrorMessage(HWND window, LPCWSTR message)
{
::MessageBoxW(window, message, L"7-Zip", MB_OK | MB_ICONSTOP);
}
void ShowErrorMessageHwndRes(HWND window, UINT resID
#ifdef LANG
, UInt32 langID
#endif
)
{
ShowErrorMessage(window,
#ifdef LANG
LangString(resID, langID)
#else
MyLoadStringW(resID)
#endif
);
}
void ShowErrorMessageRes(UINT resID
#ifdef LANG
, UInt32 langID
#endif
)
{
ShowErrorMessageHwndRes(0, resID
#ifdef LANG
, langID
#endif
);
}
void ShowErrorMessageDWORD(HWND window, DWORD errorCode)
{
ShowErrorMessage(window, NError::MyFormatMessageW(errorCode));
}
void ShowLastErrorMessage(HWND window)
{
ShowErrorMessageDWORD(window, ::GetLastError());
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?