Click here to Skip to main content
15,919,774 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMouse Cursor Drawing Resolution Pin
User 1278219-Jul-04 8:23
User 1278219-Jul-04 8:23 
GeneralRe: Mouse Cursor Drawing Resolution Pin
Alexander Wiseman19-Jul-04 10:22
Alexander Wiseman19-Jul-04 10:22 
GeneralRe: Mouse Cursor Drawing Resolution Pin
User 1278219-Jul-04 10:39
User 1278219-Jul-04 10:39 
GeneralRe: Mouse Cursor Drawing Resolution Pin
bikram singh19-Jul-04 11:11
bikram singh19-Jul-04 11:11 
GeneralRe: Mouse Cursor Drawing Resolution Pin
User 1278219-Jul-04 11:46
User 1278219-Jul-04 11:46 
GeneralRe: Mouse Cursor Drawing Resolution Pin
bikram singh19-Jul-04 12:31
bikram singh19-Jul-04 12:31 
GeneralRe: Mouse Cursor Drawing Resolution Pin
User 1278219-Jul-04 13:24
User 1278219-Jul-04 13:24 
GeneralRe: Mouse Cursor Drawing Resolution Pin
Alexander Wiseman19-Jul-04 15:47
Alexander Wiseman19-Jul-04 15:47 
I tried to quickly implement a basic dialog-based application which recorded mouse movement for about 2 seconds and then replayed the result. Oddly enough, the movement was smooth and exactly what I did during the recording period. Granted this wasn't through hooking, but I think it proves that one should be able to get every mouse movement, or at least a sufficient number to reproduce a smooth motion.

Here is the main code for recording and replaying ('points' is a CArray of CPoints and 'pt' is a CPoint, both defined in the class definition):
<br />
void CMouseMoveDlg::OnMouseMove(UINT nFlags, CPoint point) <br />
{<br />
	if(bStarted)<br />
	{<br />
		GetCursorPos(&pt);<br />
		points.Add(pt);<br />
	}<br />
	<br />
	CDialog::OnMouseMove(nFlags, point);<br />
}<br />
<br />
void CMouseMoveDlg::OnReplay() <br />
{<br />
	for(int h = 0; h < points.GetSize(); h++)<br />
	{<br />
		pt = points.GetAt(h);<br />
		SetCursorPos(pt.x, pt.y);<br />
		Sleep(10);<br />
	}<br />
}<br />


If you would like I could have a look at your code. If you wish to send it to me (or just the relevant portions) my email address is Alexander@wisemanweb.com. I will try to implement this logic inside a hook as soon as I have a chance.

Sincerely,
Alexander Wiseman

Est melior esse quam videri
It is better to be than to seem
GeneralRe: Mouse Cursor Drawing Resolution Pin
Alexander Wiseman19-Jul-04 15:56
Alexander Wiseman19-Jul-04 15:56 
GeneralRe: Mouse Cursor Drawing Resolution Pin
User 1278220-Jul-04 11:28
User 1278220-Jul-04 11:28 
GeneralRe: Mouse Cursor Drawing Resolution Pin
Alexander Wiseman20-Jul-04 11:34
Alexander Wiseman20-Jul-04 11:34 
GeneralRe: Mouse Cursor Drawing Resolution Pin
gamitech19-Jul-04 12:03
gamitech19-Jul-04 12:03 
GeneralRe: Mouse Cursor Drawing Resolution Pin
User 1278219-Jul-04 12:24
User 1278219-Jul-04 12:24 
GeneralRe: Mouse Cursor Drawing Resolution Pin
gamitech19-Jul-04 13:11
gamitech19-Jul-04 13:11 
GeneralThreading... Pin
0v3rloader19-Jul-04 7:37
0v3rloader19-Jul-04 7:37 
GeneralRe: Threading... Pin
David Crow19-Jul-04 9:17
David Crow19-Jul-04 9:17 
GeneralRe: Threading... Pin
0v3rloader19-Jul-04 22:53
0v3rloader19-Jul-04 22:53 
GeneralDatabase Application Performance Pin
Sridhar Sanikommu19-Jul-04 7:01
Sridhar Sanikommu19-Jul-04 7:01 
GeneralRe: Database Application Performance Pin
G. Steudtel19-Jul-04 7:10
G. Steudtel19-Jul-04 7:10 
GeneralRe: Database Application Performance Pin
Ivan Cachicatari19-Jul-04 7:12
Ivan Cachicatari19-Jul-04 7:12 
GeneralRe: Database Application Performance Pin
Alexander Wiseman19-Jul-04 7:25
Alexander Wiseman19-Jul-04 7:25 
GeneralRe: Database Application Performance Pin
Sridhar Sanikommu19-Jul-04 7:35
Sridhar Sanikommu19-Jul-04 7:35 
GeneralRe: Database Application Performance Pin
Alexander Wiseman19-Jul-04 10:14
Alexander Wiseman19-Jul-04 10:14 
GeneralRe: Database Application Performance Pin
Sridhar Sanikommu19-Jul-04 11:28
Sridhar Sanikommu19-Jul-04 11:28 
GeneralRe: Database Application Performance Pin
Alexander Wiseman19-Jul-04 15:52
Alexander Wiseman19-Jul-04 15:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.