Reduced system resource usage.

This commit is contained in:
spx
2011-10-01 06:27:20 +00:00
parent e1aafc9705
commit 6dd79c451d
3 changed files with 6 additions and 39 deletions

View File

@ -230,11 +230,10 @@ CMeterWindow::~CMeterWindow()
*/
int CMeterWindow::Initialize(CRainmeter& Rainmeter)
{
WNDCLASSEX wc = {sizeof(WNDCLASSEX)};
m_Rainmeter = &Rainmeter;
// Register the windowclass
WNDCLASSEX wc = {sizeof(WNDCLASSEX)};
wc.style = CS_NOCLOSE | CS_DBLCLKS;
wc.lpfnWndProc = WndProc;
wc.hInstance = m_Rainmeter->GetInstance();

View File

@ -53,17 +53,9 @@ CTrayWindow::CTrayWindow(HINSTANCE instance) : m_Instance(instance),
m_TrayPos(),
m_TrayIconEnabled(true)
{
WNDCLASS wc;
wc.style = 0;
WNDCLASS wc = {0};
wc.lpfnWndProc = (WNDPROC)WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = instance;
wc.hIcon = LoadIcon(instance, MAKEINTRESOURCE(IDI_WINDOW));
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
wc.lpszMenuName = NULL;
wc.lpszClassName = L"RainmeterTrayClass";
RegisterClass(&wc);