Fixed the abnormal termination on startup caused by r313.

This commit is contained in:
spx 2009-11-20 10:39:41 +00:00
parent 4f71fe8791
commit 794d3c8c77

View File

@ -448,6 +448,8 @@ void CMeterWindow::MoveWindow(int x, int y)
{ {
SetWindowPos(m_Window, NULL, x, y, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE); SetWindowPos(m_Window, NULL, x, y, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE);
ScreenToWindow();
if (m_SavePosition) if (m_SavePosition)
{ {
WriteConfig(); WriteConfig();
@ -3302,15 +3304,18 @@ LRESULT CMeterWindow::OnMove(WPARAM wParam, LPARAM lParam)
} }
*/ */
if (m_Dragging)
{
//TODO: Recaculate WindowX/Y based on position flags //TODO: Recaculate WindowX/Y based on position flags
//m_WindowX = m_ScreenX; //m_WindowX = m_ScreenX;
//m_WindowY = m_ScreenY; //m_WindowY = m_ScreenY;
ScreenToWindow(); ScreenToWindow();
if (m_SavePosition && m_Dragging) if (m_SavePosition)
{ {
WriteConfig(); WriteConfig();
} }
}
return 0; return 0;
} }