Skip to content

Instantly share code, notes, and snippets.

@davespanton
Created October 10, 2011 21:34
Show Gist options
  • Save davespanton/1276619 to your computer and use it in GitHub Desktop.
Save davespanton/1276619 to your computer and use it in GitHub Desktop.
Native process example pt 2.
#include "stdafx.h"
#include <iostream>
#include <sstream>
#include <windows.h>
int _tmain(int argc, _TCHAR* argv[])
{
POINT pt;
int i = 1;
while( i >= 0 )
{
GetCursorPos(&pt);
std::string s;
std::string t;
std::stringstream sout;
std::stringstream tout;
sout<<pt.x;
s = sout.str();
tout<<pt.y;
t = tout.str();
std::cout << s + " : " + t;
std::cout.flush();
Sleep(100);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment