Skip to content

Commit

Permalink
reduce binary size 8
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Jan 13, 2024
1 parent 1f0324e commit 397ae5a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 38 deletions.
4 changes: 2 additions & 2 deletions GUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6149,10 +6149,10 @@ void __fastcall MainWnd_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT /*codeNo
bUpdateImage = TRUE;
break;
case ID_OPENREADME: // ReadMeを開く。
XgOpenReadMe(hwnd);
XgOpenLocalFile(hwnd, XgLoadStringDx1(IDS_README));
break;
case ID_OPENLICENSE: // Licenseを開く。
XgOpenLicense(hwnd);
XgOpenLocalFile(hwnd, XgLoadStringDx1(IDS_LICENSE));
break;
case ID_OPENPATTERNS: // パターンを開く。
XgOpenPatterns(hwnd);
Expand Down
30 changes: 0 additions & 30 deletions Utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,36 +316,6 @@ XgCenterMessageBoxIndirectW(LPMSGBOXPARAMS lpMsgBoxParams) noexcept
return nID; // メッセージボックスの戻り値。
}

// ReadMeを開く。
void __fastcall XgOpenReadMe(HWND hwnd) noexcept
{
// 実行ファイルのパスを取得。
WCHAR szPath[MAX_PATH];
::GetModuleFileNameW(nullptr, szPath, _countof(szPath));

// ReadMeへのパスを作成。
PathRemoveFileSpec(szPath);
PathAppend(szPath, XgLoadStringDx1(IDS_README));

// ReadMeを開く。
ShellExecuteW(hwnd, nullptr, szPath, nullptr, nullptr, SW_SHOWNORMAL);
}

// Licenseを開く。
void __fastcall XgOpenLicense(HWND hwnd) noexcept
{
// 実行ファイルのパスを取得。
WCHAR szPath[MAX_PATH];
::GetModuleFileNameW(nullptr, szPath, _countof(szPath));

// Licenseへのパスを作成。
PathRemoveFileSpec(szPath);
PathAppend(szPath, XgLoadStringDx1(IDS_LICENSE));

// Licenseを開く。
ShellExecuteW(hwnd, nullptr, szPath, nullptr, nullptr, SW_SHOWNORMAL);
}

// ファイルが書き込み可能か?
bool __fastcall XgCanWriteFile(const WCHAR *pszFile)
{
Expand Down
6 changes: 0 additions & 6 deletions Utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,6 @@ XgCenterMessageBoxW(HWND hwnd, LPCWSTR pszText, LPCWSTR pszCaption, UINT uType)
int __fastcall
XgCenterMessageBoxIndirectW(LPMSGBOXPARAMS lpMsgBoxParams) noexcept;

// ReadMeを開く。
void __fastcall XgOpenReadMe(HWND hwnd) noexcept;

// Licenseを開く。
void __fastcall XgOpenLicense(HWND hwnd) noexcept;

// ファイルが書き込み可能か?
bool __fastcall XgCanWriteFile(const WCHAR *pszFile);

Expand Down

0 comments on commit 397ae5a

Please sign in to comment.