@@ -773,11 +773,11 @@ void CHideScreenSpyDlg::SendScaledMouseMessage(MSG* pMsg, bool makeLP) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MYMSG msg(*pMsg);
|
MYMSG msg(*pMsg);
|
||||||
auto low = ((LONG)LOWORD(pMsg->lParam)) * m_wZoom;
|
LONG low = ((LONG)LOWORD(pMsg->lParam)) * m_wZoom;
|
||||||
auto high = ((LONG)HIWORD(pMsg->lParam)) * m_hZoom;
|
LONG high = ((LONG)HIWORD(pMsg->lParam)) * m_hZoom;
|
||||||
if(makeLP) msg.lParam = MAKELPARAM(low, high);
|
if(makeLP) msg.lParam = MAKELPARAM(low, high);
|
||||||
msg.pt.x = (int)(low + m_rect.left);
|
msg.pt.x = low + m_rect.left;
|
||||||
msg.pt.y = (int)(high + m_rect.top);
|
msg.pt.y = high + m_rect.top;
|
||||||
SendCommand(msg);
|
SendCommand(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -182,9 +182,8 @@ BOOL CScreenSpyDlg::OnInitDialog()
|
|||||||
SetClassLongPtr(m_hWnd, GCLP_HCURSOR, m_bIsCtrl ? (LONG_PTR)m_hRemoteCursor : (LONG_PTR)LoadCursor(NULL, IDC_NO));
|
SetClassLongPtr(m_hWnd, GCLP_HCURSOR, m_bIsCtrl ? (LONG_PTR)m_hRemoteCursor : (LONG_PTR)LoadCursor(NULL, IDC_NO));
|
||||||
|
|
||||||
GetClientRect(&m_CRect);
|
GetClientRect(&m_CRect);
|
||||||
ScreenToClient(m_CRect);
|
m_wZoom = ((double)m_BitmapInfor_Full->bmiHeader.biWidth) / ((double)(m_CRect.Width()));
|
||||||
m_wZoom = ((double)m_BitmapInfor_Full->bmiHeader.biWidth) / ((double)(m_CRect.right - m_CRect.left));
|
m_hZoom = ((double)m_BitmapInfor_Full->bmiHeader.biHeight) / ((double)(m_CRect.Height()));
|
||||||
m_hZoom = ((double)m_BitmapInfor_Full->bmiHeader.biHeight) / ((double)(m_CRect.bottom - m_CRect.top));
|
|
||||||
ShowScrollBar(SB_BOTH, !m_bAdaptiveSize);
|
ShowScrollBar(SB_BOTH, !m_bAdaptiveSize);
|
||||||
|
|
||||||
SendNext();
|
SendNext();
|
||||||
@@ -560,11 +559,12 @@ void CScreenSpyDlg::SendScaledMouseMessage(MSG* pMsg, bool makeLP) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
MYMSG msg(*pMsg);
|
MYMSG msg(*pMsg);
|
||||||
auto low = m_bAdaptiveSize ? ((LONG)LOWORD(pMsg->lParam)) * m_wZoom : LOWORD(pMsg->lParam) + m_ulHScrollPos;
|
LONG x = LOWORD(pMsg->lParam), y = HIWORD(pMsg->lParam);
|
||||||
auto high = m_bAdaptiveSize ? ((LONG)HIWORD(pMsg->lParam)) * m_hZoom : HIWORD(pMsg->lParam) + m_ulVScrollPos;
|
LONG low = m_bAdaptiveSize ? x * m_wZoom : x + m_ulHScrollPos;
|
||||||
|
LONG high = m_bAdaptiveSize ? y * m_hZoom : y + m_ulVScrollPos;
|
||||||
if (makeLP) msg.lParam = MAKELPARAM(low, high);
|
if (makeLP) msg.lParam = MAKELPARAM(low, high);
|
||||||
msg.pt.x = (int)low;
|
msg.pt.x = low;
|
||||||
msg.pt.y = (int)high;
|
msg.pt.y = high;
|
||||||
SendCommand(&msg);
|
SendCommand(&msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -836,9 +836,6 @@ void CScreenSpyDlg::OnSize(UINT nType, int cx, int cy)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
GetClientRect(&m_CRect);
|
GetClientRect(&m_CRect);
|
||||||
ScreenToClient(m_CRect);
|
m_wZoom = ((double)m_BitmapInfor_Full->bmiHeader.biWidth) / ((double)(m_CRect.Width()));
|
||||||
if (!m_bIsFirst) {
|
m_hZoom = ((double)m_BitmapInfor_Full->bmiHeader.biHeight) / ((double)(m_CRect.Height()));
|
||||||
m_wZoom = ((double)m_BitmapInfor_Full->bmiHeader.biWidth) / ((double)(m_CRect.right - m_CRect.left));
|
|
||||||
m_hZoom = ((double)m_BitmapInfor_Full->bmiHeader.biHeight) / ((double)(m_CRect.bottom - m_CRect.top));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user