mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 22:47:28 +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
|
@ -400,7 +400,11 @@ LRESULT CCanvasWindow::OnMouseMove(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
|
||||||
|
|
||||||
if (!m_drawing)
|
if (!m_drawing)
|
||||||
{
|
{
|
||||||
|
RECT rcImage;
|
||||||
|
GetImageRect(rcImage);
|
||||||
|
|
||||||
CString strCoord;
|
CString strCoord;
|
||||||
|
if (::PtInRect(&rcImage, pt))
|
||||||
strCoord.Format(_T("%ld, %ld"), pt.x, pt.y);
|
strCoord.Format(_T("%ld, %ld"), pt.x, pt.y);
|
||||||
::SendMessage(g_hStatusBar, SB_SETTEXT, 1, (LPARAM) (LPCTSTR) strCoord);
|
::SendMessage(g_hStatusBar, SB_SETTEXT, 1, (LPARAM) (LPCTSTR) strCoord);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue