mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
- Fixed negative W/H issue: http://rainmeter.net/forum/viewtopic.php?t=8614&p=59732#p59732
- Code cleanup.
This commit is contained in:
@ -28,14 +28,21 @@
|
||||
#include "RainmeterQuery.h"
|
||||
#include "../Version.h"
|
||||
|
||||
#define TRAYTIMER 3
|
||||
|
||||
#define RAINMETER_OFFICIAL L"http://rainmeter.net/cms/"
|
||||
#define RAINMETER_MANUAL L"http://rainmeter.net/cms/Manual"
|
||||
#define RAINMETER_MANUALBETA L"http://rainmeter.net/cms/Manual_beta"
|
||||
|
||||
#define ZPOS_FLAGS (SWP_NOMOVE | SWP_NOSIZE | SWP_NOOWNERZORDER | SWP_NOACTIVATE | SWP_NOSENDCHANGING)
|
||||
|
||||
enum TIMER
|
||||
{
|
||||
TIMER_TRAY = 3
|
||||
};
|
||||
enum INTERVAL
|
||||
{
|
||||
INTERVAL_TRAY = 1000
|
||||
};
|
||||
|
||||
const UINT WM_TASKBARCREATED = ::RegisterWindowMessage(L"TaskbarCreated");
|
||||
|
||||
extern CRainmeter* Rainmeter;
|
||||
@ -79,7 +86,7 @@ CTrayWindow::CTrayWindow(HINSTANCE instance) : m_Instance(instance),
|
||||
|
||||
CTrayWindow::~CTrayWindow()
|
||||
{
|
||||
KillTimer(m_Window, TRAYTIMER);
|
||||
KillTimer(m_Window, TIMER_TRAY);
|
||||
RemoveTrayIcon();
|
||||
|
||||
delete m_Bitmap;
|
||||
@ -263,7 +270,7 @@ HICON CTrayWindow::CreateTrayIcon(double value)
|
||||
void CTrayWindow::ReadConfig(CConfigParser& parser)
|
||||
{
|
||||
// Clear old Settings
|
||||
KillTimer(m_Window, TRAYTIMER);
|
||||
KillTimer(m_Window, TIMER_TRAY);
|
||||
|
||||
delete m_Measure;
|
||||
m_Measure = NULL;
|
||||
@ -374,7 +381,7 @@ void CTrayWindow::ReadConfig(CConfigParser& parser)
|
||||
|
||||
if (m_Measure)
|
||||
{
|
||||
SetTimer(m_Window, TRAYTIMER, 1000, NULL); // Update the tray once per sec
|
||||
SetTimer(m_Window, TIMER_TRAY, INTERVAL_TRAY, NULL); // Update the tray once per sec
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user