mirror of
https://github.com/reactos/reactos.git
synced 2025-02-20 15:35:04 +00:00
[MSPAINT] Check out of image in updating status bar (#5779)
Check out of the image by using ::PtInRect and CCanvasWindow::GetImageRect. If out, then don't show the status bar text. CORE-19219
This commit is contained in:
parent
611d89eb8b
commit
0c164f081a
1 changed files with 5 additions and 1 deletions
|
@ -400,8 +400,12 @@ LRESULT CCanvasWindow::OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
|
|||
|
||||
if (!m_drawing)
|
||||
{
|
||||
RECT rcImage;
|
||||
GetImageRect(rcImage);
|
||||
|
||||
CString strCoord;
|
||||
strCoord.Format(_T("%ld, %ld"), pt.x, pt.y);
|
||||
if (::PtInRect(&rcImage, pt))
|
||||
strCoord.Format(_T("%ld, %ld"), pt.x, pt.y);
|
||||
::SendMessage(g_hStatusBar, SB_SETTEXT, 1, (LPARAM) (LPCTSTR) strCoord);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue