Added #WORKAREAX# and #WORKAREAY# build-in variables.

This commit is contained in:
Kimmo Pekkola 2009-08-01 15:38:03 +00:00
parent e789639773
commit b6954bcdd0

View File

@ -75,6 +75,10 @@ void CConfigParser::Initialize(LPCTSTR filename, CRainmeter* pRainmeter)
SystemParametersInfo(SPI_GETWORKAREA, 0, &workArea, 0);
TCHAR buffer[256];
swprintf(buffer, L"%i", workArea.left);
m_Variables[L"WORKAREAX"] = buffer;
swprintf(buffer, L"%i", workArea.top);
m_Variables[L"WORKAREAY"] = buffer;
swprintf(buffer, L"%i", workArea.right - workArea.left);
m_Variables[L"WORKAREAWIDTH"] = buffer;
swprintf(buffer, L"%i", workArea.bottom - workArea.top);