diff --git a/ExplorerPatcher/GUI.c b/ExplorerPatcher/GUI.c index d5cc726..86932b5 100644 --- a/ExplorerPatcher/GUI.c +++ b/ExplorerPatcher/GUI.c @@ -182,6 +182,31 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt) ); if (!strncmp(line, ";M ", 3)) { + TCHAR exeName[MAX_PATH + 1]; + GetProcessImageFileNameW( + OpenProcess( + PROCESS_QUERY_INFORMATION, + FALSE, + GetCurrentProcessId() + ), + exeName, + MAX_PATH + ); + PathStripPath(exeName); + if (wcscmp(exeName, L"explorer.exe")) + { + LoadStringW(hModule, IDS_PRODUCTNAME, text, MAX_LINE_LENGTH); + } + else + { + LoadStringW(GetModuleHandleW(L"ExplorerFrame.dll"), 50222, text, 260); + wchar_t* p = wcschr(text, L'('); + if (p) + { + p--; + *p = 0; + } + } rcText.bottom += GUI_CAPTION_LINE_HEIGHT - dwLineHeight; dwLineHeight = GUI_CAPTION_LINE_HEIGHT; _this->extent.cyTopHeight = rcText.bottom; @@ -900,6 +925,10 @@ __declspec(dllexport) int ZZGUI(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLin TCHAR title[260]; LoadStringW(GetModuleHandleW(L"ExplorerFrame.dll"), 726, title, 260); + if (title[0] == 0) + { + LoadStringW(hModule, IDS_PRODUCTNAME, title, 260); + } HWND hwnd = CreateWindowEx( NULL, diff --git a/ExplorerPatcher/GUI.h b/ExplorerPatcher/GUI.h index 32d0e08..27676bb 100644 --- a/ExplorerPatcher/GUI.h +++ b/ExplorerPatcher/GUI.h @@ -5,6 +5,8 @@ name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \ processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") #include #pragma comment(lib, "Version.lib") +#include +#pragma comment(lib, "Shlwapi.lib") #include #include #include diff --git a/ExplorerPatcher/settings.reg b/ExplorerPatcher/settings.reg index 85a8d4b..99bfdcf 100644 --- a/ExplorerPatcher/settings.reg +++ b/ExplorerPatcher/settings.reg @@ -1,6 +1,6 @@ Windows Registry Editor Version 5.00 -;M Properties +;M Settings ;T Shell ;l Enable missing system tray icons