Removed support for several RAINMETER_QUERY messages

This commit is contained in:
Birunthan Mohanathas 2012-04-06 15:32:36 +03:00
parent 1e4513e9c6
commit df61f5c1f8
3 changed files with 3 additions and 48 deletions

View File

@ -92,22 +92,13 @@ These Queries return a string in a wide char format
#define RAINMETER_QUERY_ID_PROGRAM_PATH 4104 #define RAINMETER_QUERY_ID_PROGRAM_PATH 4104
#define RAINMETER_QUERY_ID_LOG_PATH 4105 #define RAINMETER_QUERY_ID_LOG_PATH 4105
#define RAINMETER_QUERY_ID_CONFIG_EDITOR 4106 #define RAINMETER_QUERY_ID_CONFIG_EDITOR 4106
#define RAINMETER_QUERY_ID_STATS_DATE 4108
#define RAINMETER_QUERY_ID_TRAY_EX_L 4109
#define RAINMETER_QUERY_ID_TRAY_EX_R 4110
#define RAINMETER_QUERY_ID_TRAY_EX_M 4111
#define RAINMETER_QUERY_ID_TRAY_EX_DL 4112
#define RAINMETER_QUERY_ID_TRAY_EX_DR 4113
#define RAINMETER_QUERY_ID_TRAY_EX_DM 4114
/* /*
These Queries return a numerical value in a direct message, the data These Queries return a numerical value in a direct message, the data
is stored in the lParam of the message sent to your window, and the msg section is stored in the lParam of the message sent to your window, and the msg section
will contain WM_QUERY_RAINMETER_RETURN will contain WM_QUERY_RAINMETER_RETURN
*/ */
#define RAINMETER_QUERY_ID_VERSION_CHECK 4115 //0 for disabled, 1 for checking, 2 for new version available
#define RAINMETER_QUERY_ID_IS_DEBUGGING 4116 #define RAINMETER_QUERY_ID_IS_DEBUGGING 4116
#define RAINMETER_QUERY_ID_IS_LITESTEP 4117
/*QUERY IDs used with WM_COPYDATA /*QUERY IDs used with WM_COPYDATA
Usage: Send a WM_COPYDATA message to rainmeter via SendMessage(). Usage: Send a WM_COPYDATA message to rainmeter via SendMessage().

View File

@ -587,48 +587,12 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA
sendCopyData(Rainmeter->GetConfigEditor()); sendCopyData(Rainmeter->GetConfigEditor());
return 0; return 0;
} }
else if (wParam == RAINMETER_QUERY_ID_STATS_DATE)
{
sendCopyData(Rainmeter->GetStatsDate());
return 0;
}
else if (wParam == RAINMETER_QUERY_ID_TRAY_EX_R)
{
sendCopyData(Rainmeter->GetTrayExecuteR());
return 0;
}
else if (wParam == RAINMETER_QUERY_ID_TRAY_EX_M)
{
sendCopyData(Rainmeter->GetTrayExecuteM());
return 0;
}
else if (wParam == RAINMETER_QUERY_ID_TRAY_EX_DR)
{
sendCopyData(Rainmeter->GetTrayExecuteDR());
return 0;
}
else if (wParam == RAINMETER_QUERY_ID_TRAY_EX_DM)
{
sendCopyData(Rainmeter->GetTrayExecuteDM());
return 0;
}
else if (wParam == RAINMETER_QUERY_ID_VERSION_CHECK)
{
UINT versioncheck = ((int)Rainmeter->GetDisableVersionCheck() * ((int)Rainmeter->GetDisableVersionCheck() + (int)Rainmeter->GetNewVersion()));
SendMessage((HWND)lParam, WM_QUERY_RAINMETER_RETURN, (WPARAM)hWnd, (LPARAM)versioncheck);
return 0;
}
else if (wParam == RAINMETER_QUERY_ID_IS_DEBUGGING) else if (wParam == RAINMETER_QUERY_ID_IS_DEBUGGING)
{ {
BOOL debug = Rainmeter->GetDebug(); BOOL debug = Rainmeter->GetDebug();
SendMessage((HWND)lParam, WM_QUERY_RAINMETER_RETURN, (WPARAM)hWnd, (LPARAM)debug); SendMessage((HWND)lParam, WM_QUERY_RAINMETER_RETURN, (WPARAM)hWnd, (LPARAM)debug);
return 0; return 0;
} }
else if (wParam == RAINMETER_QUERY_ID_IS_LITESTEP)
{
SendMessage((HWND)lParam, WM_QUERY_RAINMETER_RETURN, (WPARAM)hWnd, (LPARAM)0);
return 0;
}
} }
return 1; return 1;

View File

@ -52,9 +52,9 @@ protected:
static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
private: private:
BOOL AddTrayIcon(); void AddTrayIcon();
BOOL RemoveTrayIcon(); void RemoveTrayIcon();
BOOL ModifyTrayIcon(double value); void ModifyTrayIcon(double value);
HICON CreateTrayIcon(double value); HICON CreateTrayIcon(double value);
HICON m_TrayIcon; HICON m_TrayIcon;