Minor tweaks of "hand pointer".

This commit is contained in:
spx 2009-09-26 07:16:55 +00:00
parent 5560d6e72a
commit f6f293cc57
2 changed files with 8 additions and 6 deletions

View File

@ -275,12 +275,10 @@ void CMeter::ReadConfig(const WCHAR* section)
m_MouseActionCursor = 0!= parser.ReadInt(section, L"MouseActionCursor", 1); m_MouseActionCursor = 0!= parser.ReadInt(section, L"MouseActionCursor", 1);
if(!m_MiddleMouseUpAction.empty() || !m_MiddleMouseDownAction.empty() m_HasMouseAction =
( !m_MiddleMouseUpAction.empty() || !m_MiddleMouseDownAction.empty()
|| !m_LeftMouseUpAction.empty() || !m_LeftMouseDownAction.empty() || !m_LeftMouseUpAction.empty() || !m_LeftMouseDownAction.empty()
|| !m_RightMouseUpAction.empty() || !m_RightMouseDownAction.empty() ) || !m_RightMouseUpAction.empty() || !m_RightMouseDownAction.empty() );
{
m_HasMouseAction = true;
}
m_MeasureName = parser.ReadString(section, L"MeasureName", L""); m_MeasureName = parser.ReadString(section, L"MeasureName", L"");

View File

@ -2445,14 +2445,18 @@ LRESULT CMeterWindow::OnMouseMove(WPARAM wParam, LPARAM lParam)
if((*j)->HitTest(pos.x, pos.y) && (*j)->HasMouseActionCursor()) if((*j)->HitTest(pos.x, pos.y) && (*j)->HasMouseActionCursor())
{ {
drawCursor = ((*j)->HasMouseAction() || button); drawCursor |= ((*j)->HasMouseAction() || button);
} }
} }
if(drawCursor) if(drawCursor)
{
SetCursor(LoadCursor(NULL, IDC_HAND)); SetCursor(LoadCursor(NULL, IDC_HAND));
}
else else
{
SetCursor(LoadCursor(NULL, IDC_ARROW)); SetCursor(LoadCursor(NULL, IDC_ARROW));
}
if (redraw) if (redraw)
{ {