About/Manage: Fixed that dialog fails to open on first click/bang.

This commit is contained in:
Birunthan Mohanathas 2011-09-05 05:20:36 +00:00
parent e258dc9137
commit 0566e67d54
2 changed files with 10 additions and 14 deletions

View File

@ -233,10 +233,8 @@ INT_PTR CDialogAbout::OnInitDialog(WPARAM wParam, LPARAM lParam)
c_WindowPlacement.length = sizeof(WINDOWPLACEMENT); c_WindowPlacement.length = sizeof(WINDOWPLACEMENT);
GetWindowPlacement(m_Window, &c_WindowPlacement); GetWindowPlacement(m_Window, &c_WindowPlacement);
} }
else
{
SetWindowPlacement(m_Window, &c_WindowPlacement); SetWindowPlacement(m_Window, &c_WindowPlacement);
}
return TRUE; return TRUE;
} }

View File

@ -203,16 +203,6 @@ INT_PTR CDialogManage::OnInitDialog(WPARAM wParam, LPARAM lParam)
HICON hIcon = LoadIcon(Rainmeter->GetInstance(), MAKEINTRESOURCE(IDI_TRAY)); HICON hIcon = LoadIcon(Rainmeter->GetInstance(), MAKEINTRESOURCE(IDI_TRAY));
SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon); SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
if (c_WindowPlacement.length == 0)
{
c_WindowPlacement.length = sizeof(WINDOWPLACEMENT);
GetWindowPlacement(m_Window, &c_WindowPlacement);
}
else
{
SetWindowPlacement(m_Window, &c_WindowPlacement);
}
HWND item = GetDlgItem(m_Window, IDC_MANAGE_TAB); HWND item = GetDlgItem(m_Window, IDC_MANAGE_TAB);
TCITEM tci = {0}; TCITEM tci = {0};
tci.mask = TCIF_TEXT; tci.mask = TCIF_TEXT;
@ -241,6 +231,14 @@ INT_PTR CDialogManage::OnInitDialog(WPARAM wParam, LPARAM lParam)
item = GetDlgItem(m_TabSkins->GetWindow(), IDC_MANAGESKINS_FILE_TEXT); item = GetDlgItem(m_TabSkins->GetWindow(), IDC_MANAGESKINS_FILE_TEXT);
SendMessage(item, WM_SETFONT, (WPARAM)m_FontBold, 0); SendMessage(item, WM_SETFONT, (WPARAM)m_FontBold, 0);
if (c_WindowPlacement.length == 0)
{
c_WindowPlacement.length = sizeof(WINDOWPLACEMENT);
GetWindowPlacement(m_Window, &c_WindowPlacement);
}
SetWindowPlacement(m_Window, &c_WindowPlacement);
return TRUE; return TRUE;
} }