mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Modified for icons on About dialog box.
This commit is contained in:
parent
5b7a985a7e
commit
bea3b2821a
@ -145,7 +145,7 @@ BOOL InitApplication(HINSTANCE hInstance, const WCHAR* WinClass)
|
|||||||
wc.cbClsExtra = 0;
|
wc.cbClsExtra = 0;
|
||||||
wc.cbWndExtra = 0;
|
wc.cbWndExtra = 0;
|
||||||
wc.hInstance = hInstance;
|
wc.hInstance = hInstance;
|
||||||
wc.hIcon = LoadIcon(NULL, MAKEINTRESOURCE(IDI_RAINMETER));
|
wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_RAINMETER));
|
||||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||||
wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
|
wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
|
||||||
wc.lpszMenuName = NULL;
|
wc.lpszMenuName = NULL;
|
||||||
|
@ -43,6 +43,12 @@ HWND OpenAboutDialog(HWND hwndOwner, HINSTANCE instance)
|
|||||||
if (g_DialogWin == NULL)
|
if (g_DialogWin == NULL)
|
||||||
{
|
{
|
||||||
g_DialogWin = CreateDialog(instance, MAKEINTRESOURCE(IDD_ABOUT_DIALOG), hwndOwner, AboutProc);
|
g_DialogWin = CreateDialog(instance, MAKEINTRESOURCE(IDD_ABOUT_DIALOG), hwndOwner, AboutProc);
|
||||||
|
|
||||||
|
if (g_DialogWin)
|
||||||
|
{
|
||||||
|
HICON hIcon = LoadIcon(instance, MAKEINTRESOURCE(IDI_TRAY));
|
||||||
|
SendMessage(g_DialogWin, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ShowWindow(g_DialogWin, SW_SHOWNORMAL);
|
ShowWindow(g_DialogWin, SW_SHOWNORMAL);
|
||||||
UpdateAboutStatistics();
|
UpdateAboutStatistics();
|
||||||
|
@ -878,10 +878,6 @@ void CMeterWindow::RunBang(BANGCOMMAND bang, const WCHAR* arg)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BANG_ABOUT:
|
|
||||||
OpenAboutDialog(m_Window, m_Rainmeter->GetInstance());
|
|
||||||
break;
|
|
||||||
|
|
||||||
case BANG_MOVEMETER:
|
case BANG_MOVEMETER:
|
||||||
pos = wcschr(arg, ' ');
|
pos = wcschr(arg, ' ');
|
||||||
if (pos != NULL)
|
if (pos != NULL)
|
||||||
|
@ -126,7 +126,6 @@ enum BANGCOMMAND
|
|||||||
BANG_DISABLEMEASUREGROUP,
|
BANG_DISABLEMEASUREGROUP,
|
||||||
|
|
||||||
BANG_LSHOOK,
|
BANG_LSHOOK,
|
||||||
BANG_ABOUT,
|
|
||||||
BANG_PLUGIN,
|
BANG_PLUGIN,
|
||||||
BANG_SETVARIABLE
|
BANG_SETVARIABLE
|
||||||
};
|
};
|
||||||
|
@ -937,7 +937,10 @@ void RainmeterLsHook(HWND, const char* arg)
|
|||||||
*/
|
*/
|
||||||
void RainmeterAbout(HWND, const char* arg)
|
void RainmeterAbout(HWND, const char* arg)
|
||||||
{
|
{
|
||||||
BangWithArgs(BANG_ABOUT, ConvertToWide(arg).c_str(), 0);
|
if (Rainmeter)
|
||||||
|
{
|
||||||
|
OpenAboutDialog(Rainmeter->GetTrayWindow()->GetWindow(), Rainmeter->GetInstance());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2282,7 +2285,6 @@ void CRainmeter::ScanForThemes(std::wstring& path)
|
|||||||
|
|
||||||
void CRainmeter::SaveSettings()
|
void CRainmeter::SaveSettings()
|
||||||
{
|
{
|
||||||
// Just one setting for writing at the moment
|
|
||||||
WritePrivateProfileString(L"Rainmeter", L"CheckUpdate", NULL , m_IniFile.c_str());
|
WritePrivateProfileString(L"Rainmeter", L"CheckUpdate", NULL , m_IniFile.c_str());
|
||||||
WritePrivateProfileString(L"Rainmeter", L"DisableVersionCheck", m_DisableVersionCheck ? L"1" : L"0" , m_IniFile.c_str());
|
WritePrivateProfileString(L"Rainmeter", L"DisableVersionCheck", m_DisableVersionCheck ? L"1" : L"0" , m_IniFile.c_str());
|
||||||
}
|
}
|
||||||
@ -2487,7 +2489,7 @@ BOOL CRainmeter::ExecuteBang(const std::wstring& bang, const std::wstring& arg,
|
|||||||
}
|
}
|
||||||
else if (wcsicmp(bang.c_str(), L"!RainmeterAbout") == 0)
|
else if (wcsicmp(bang.c_str(), L"!RainmeterAbout") == 0)
|
||||||
{
|
{
|
||||||
BangWithArgs(BANG_ABOUT, arg.c_str(), 0);
|
RainmeterAbout(NULL, NULL);
|
||||||
}
|
}
|
||||||
else if (wcsicmp(bang.c_str(), L"!RainmeterSkinMenu") == 0)
|
else if (wcsicmp(bang.c_str(), L"!RainmeterSkinMenu") == 0)
|
||||||
{
|
{
|
||||||
|
@ -47,7 +47,7 @@ CTrayWindow::CTrayWindow(HINSTANCE instance)
|
|||||||
wc.cbClsExtra = 0;
|
wc.cbClsExtra = 0;
|
||||||
wc.cbWndExtra = 0;
|
wc.cbWndExtra = 0;
|
||||||
wc.hInstance = instance;
|
wc.hInstance = instance;
|
||||||
wc.hIcon = NULL;
|
wc.hIcon = LoadIcon(instance, MAKEINTRESOURCE(IDI_TRAY));
|
||||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||||
wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
|
wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
|
||||||
wc.lpszMenuName = NULL;
|
wc.lpszMenuName = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user