[Tutorial]How to possess somebody's mouse.

Posts 16–22 of 22 · Page 2 of 2
Quote Originally Posted by 'Bruno View Post
why global vars? i don't really advice doing it...
I'm not a C++ boy, I don't know why I made them globals. If it makes you happy:

[php]
#include <windows.h>



INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
int MaxX = (LONG)::GetSystemMetrics( SM_CXFULLSCREEN );
int MaxY = (LONG)::GetSystemMetrics( SM_CYFULLSCREEN );
int xAxis =0;
int yAxis =0;

do
{

yAxis++;
if(yAxis == MaxY)
{
if(xAxis == MaxX)
{
xAxis = 0;
yAxis = 0;
}
else
{
xAxis ++;
yAxis = 0;
}
}
SetCursorPos(xAxis,yAxis);

}while(!GetAsyncKeyState(VK_END)&1);

MessageBoxA(NULL, "How did you know!?", "Well done!", MB_OK);

}
[/php]

oh btw just a little thing that it's not that special but it's kinda "useless", not that important

Code:
int MaxX = GetSystemMetrics( SM_CXFULLSCREEN ); 
int MaxY = GetSystemMetrics( SM_CYFULLSCREEN );
this will do fine, you don't need the cast to LONG.. neither include the scope operator (::, i think that's the name, it's like using "Me." at VB or "This." at C# to access functions inside your class/module, pointless).

I just looked trough the code, and 2 nested for's it's easier to understand =D gj anyway ~.~
Quote Originally Posted by 'Bruno View Post
oh btw just a little thing that it's not that special but it's kinda "useless", not that important

Code:
int MaxX = GetSystemMetrics( SM_CXFULLSCREEN ); 
int MaxY = GetSystemMetrics( SM_CYFULLSCREEN );
this will do fine, you don't need the cast to LONG.. neither include the scope operator (::, i think that's the name, it's like using "Me." at VB or "This." at C# to access functions inside your class/module, pointless).

I just looked trough the code, and 2 nested for's it's easier to understand =D gj anyway ~.~
Yeah but I don't know shit all about C++ so . I told you I C+Ped those GetSystemMetrics snippets from a site I googled
Quote Originally Posted by Jason View Post


Yeah but I don't know shit all about C++ so . I told you I C+Ped those GetSystemMetrics snippets from a site I googled
Yeah, right after you did this ... ..... Noob /... j/k
Quote Originally Posted by NextGen1 View Post


Yeah, right after you did this ... ..... Noob /... j/k
.
























nice conversation guise
Posts 16–22 of 22 · Page 2 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?