Windows remote control ? Need help..
-
I'm developing a simple remote control app. To command the remote PC I use some simple API call: SetCursoPos(x,y) to set Cursor position. WindowFromPoint(x,y) to get the handle of the Window under the screen coordinates x,y. Then I send messages like WM_LBUTTONDOWn and WM_LBUTTONUp to command the window, this works, but I have a problem to open the menu bar of the remote winodw. I know that when the cusror is over the non client area of window I must send the message WM_NCLBUTTONDOWN, and this is what I do, but it doesn't , works! When the cursor is over the window menu bar and I send WM_NCLBUTTONDOWN, I expect that the Menu is opened, but it doesn't. Using SPY I knwo that this is the message that is sent to the window when you press the left mouse button over the nonclient area of the window ( the menu bar ). Any idea about what I must do to in this situation ?
-
I'm developing a simple remote control app. To command the remote PC I use some simple API call: SetCursoPos(x,y) to set Cursor position. WindowFromPoint(x,y) to get the handle of the Window under the screen coordinates x,y. Then I send messages like WM_LBUTTONDOWn and WM_LBUTTONUp to command the window, this works, but I have a problem to open the menu bar of the remote winodw. I know that when the cusror is over the non client area of window I must send the message WM_NCLBUTTONDOWN, and this is what I do, but it doesn't , works! When the cursor is over the window menu bar and I send WM_NCLBUTTONDOWN, I expect that the Menu is opened, but it doesn't. Using SPY I knwo that this is the message that is sent to the window when you press the left mouse button over the nonclient area of the window ( the menu bar ). Any idea about what I must do to in this situation ?
you are kidding me ! check this out ! thank me later : i made a remote control programme about subseven fans said it`s way better ! mouse_event The mouse_event function synthesizes mouse motion and button clicks. Windows NT: This function has been superseded. Use SendInput instead. VOID mouse_event( DWORD dwFlags, // flags specifying various motion/click variants DWORD dx, // horizontal mouse position or position change DWORD dy, // vertical mouse position or position change DWORD dwData, // amount of wheel movement DWORD dwExtraInfo // 32 bits of application-defined information ); Parameters dwFlags A set of flag bits that specify various aspects of mouse motion and button clicking. The bits in this parameter can be any reasonable combination of the following values: Value Meaning MOUSEEVENTF_ABSOLUTE Specifies that the dx and dy parameters contain normalized absolute coordinates. If not set, those parameters contain relative data: the change in position since the last reported position. This flag can be set, or not set, regardless of what kind of mouse or mouse-like device, if any, is connected to the system. For further information about relative mouse motion, see the following Remarks section. MOUSEEVENTF_MOVE Specifies that movement occurred. MOUSEEVENTF_LEFTDOWN Specifies that the left button is down. MOUSEEVENTF_LEFTUP Specifies that the left button is up. MOUSEEVENTF_RIGHTDOWN Specifies that the right button is down. MOUSEEVENTF_RIGHTUP Specifies that the right button is up. MOUSEEVENTF_MIDDLEDOWN Specifies that the middle button is down. MOUSEEVENTF_MIDDLEUP Specifies that the middle button is up. MOUSEEVENTF_WHEEL Windows NT: Specifies that the wheel has been moved, if the mouse has a wheel. The amount of movement is given in dwData dx Specifies the mouse's absolute position along the x-axis or its amount of motion since the last mouse event was generated, depending on the setting of MOUSEEVENTF_ABSOLUTE. Absolute data is given as the mouse's actual x-coordinate; relative data is given as the number of mickeys moved. A mickey is the amount that a mouse has to move for it to report that it has moved. dy Specifies the mouse's absolute position along the y-axis or its amount of motion since the last mouse event was generated, depending on the setting of MOUSEEVENTF_ABSOLUTE. Absolute data is given as the mouse's actual y-coordinate; relative data is given as the number of mickeys moved. dwData If dwFlags is M