This commit is contained in:
Birunthan Mohanathas 2012-06-01 16:21:25 +03:00
parent 579e2df81e
commit 288e68107d
2 changed files with 9 additions and 10 deletions

View File

@ -782,11 +782,11 @@ int CRainmeter::Initialize(LPCWSTR iniPath)
wc.lpfnWndProc = (WNDPROC)MainWndProc;
wc.hInstance = m_Instance;
wc.lpszClassName = RAINMETER_CLASS_NAME;
RegisterClass(&wc);
ATOM className = RegisterClass(&wc);
m_Window = CreateWindowEx(
WS_EX_TOOLWINDOW,
RAINMETER_CLASS_NAME,
MAKEINTATOM(className),
RAINMETER_WINDOW_NAME,
WS_POPUP | WS_DISABLED,
CW_USEDEFAULT,

View File

@ -68,14 +68,13 @@ void CSystem::Initialize(HINSTANCE instance)
WNDCLASS wc = {0};
wc.lpfnWndProc = (WNDPROC)WndProc;
wc.hInstance = instance;
wc.lpszClassName = L"RainmeterSystemClass";
RegisterClass(&wc);
wc.lpszClassName = L"RainmeterSystem";
ATOM className = RegisterClass(&wc);
c_Window = CreateWindowEx(
WS_EX_TOOLWINDOW,
L"RainmeterSystemClass",
L"SystemWindow",
MAKEINTATOM(className),
L"System",
WS_POPUP | WS_DISABLED,
CW_USEDEFAULT,
CW_USEDEFAULT,
@ -88,8 +87,8 @@ void CSystem::Initialize(HINSTANCE instance)
c_HelperWindow = CreateWindowEx(
WS_EX_TOOLWINDOW,
L"RainmeterSystemClass",
L"PositioningHelperWindow",
MAKEINTATOM(className),
L"PositioningHelper",
WS_POPUP | WS_DISABLED,
CW_USEDEFAULT,
CW_USEDEFAULT,
@ -875,7 +874,7 @@ bool CSystem::CheckDesktopState(HWND WorkerW)
if (WorkerW && IsWindowVisible(WorkerW))
{
hwnd = FindWindowEx(NULL, WorkerW, L"RainmeterSystemClass", L"SystemWindow");
hwnd = FindWindowEx(NULL, WorkerW, L"RainmeterSystem", L"System");
}
bool stateChanged = (hwnd && !c_ShowDesktop) || (!hwnd && c_ShowDesktop);