diff --git a/Library/DialogAbout.cpp b/Library/DialogAbout.cpp index d733f913..627f46b9 100644 --- a/Library/DialogAbout.cpp +++ b/Library/DialogAbout.cpp @@ -233,10 +233,8 @@ INT_PTR CDialogAbout::OnInitDialog(WPARAM wParam, LPARAM lParam) c_WindowPlacement.length = sizeof(WINDOWPLACEMENT); GetWindowPlacement(m_Window, &c_WindowPlacement); } - else - { - SetWindowPlacement(m_Window, &c_WindowPlacement); - } + + SetWindowPlacement(m_Window, &c_WindowPlacement); return TRUE; } diff --git a/Library/DialogManage.cpp b/Library/DialogManage.cpp index 47674429..f471c28e 100644 --- a/Library/DialogManage.cpp +++ b/Library/DialogManage.cpp @@ -203,16 +203,6 @@ INT_PTR CDialogManage::OnInitDialog(WPARAM wParam, LPARAM lParam) HICON hIcon = LoadIcon(Rainmeter->GetInstance(), MAKEINTRESOURCE(IDI_TRAY)); 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); TCITEM tci = {0}; 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); 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; }