► Show Spoiler
//Coded By zan30
#include <windows.h>
#include <iostream>
#include <math.h>
using namespace std;
bool crosshairon = false;
int crosshairsize = 0;
int cx = 0;
int cy = 0;
int green = RGB(0, 255, 0);
int red = RGB(255, 0, 0);
int blue = RGB(0, 0, 255);
int orange = RGB(255, 170, 0);
HDC ragedc = NULL;
void CrossThread(void)
{
while (1)
{
if (GetAsyncKeyState(VK_INSERT) & 1)
{
crosshairon = !crosshairon;
ragedc = GetDC(HWND_DESKTOP);
cx = GetSystemMetrics(SM_CXSCREEN) / 2 - ((crosshairsize - 1) / 2);
cy = GetSystemMetrics(SM_CYSCREEN) / 2 - ((crosshairsize - 1) / 2);
}
Sleep(1);
}
}
void Disable(void)
{
while (1)
{
if (GetAsyncKeyState(VK_DELETE) & 1)
{
crosshairon = 0;
}
}
}
int main()
{
cout << "Set crosshair size in pixle's:\n";
cin >> crosshairsize;
if (crosshairsize % 2 == 0)
{
crosshairsize += 1;
}
system("cls");
cout << "www.programs-sources.com Toggle insert to turn crosshair on and off\n";
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)CrossThread, 0, 0, 0);
while (1)
{
if (crosshairon == true)
{
for (int i = 0; i<crosshairsize; i++)
{
SetPixel(ragedc, cx + i, cy + ((crosshairsize - 1) / 2), orange);
SetPixel(ragedc, cx + ((crosshairsize - 1) / 2), cy + i, orange);
}
}
Sleep(1);
}
}
#include <windows.h>
#include <iostream>
#include <math.h>
using namespace std;
bool crosshairon = false;
int crosshairsize = 0;
int cx = 0;
int cy = 0;
int green = RGB(0, 255, 0);
int red = RGB(255, 0, 0);
int blue = RGB(0, 0, 255);
int orange = RGB(255, 170, 0);
HDC ragedc = NULL;
void CrossThread(void)
{
while (1)
{
if (GetAsyncKeyState(VK_INSERT) & 1)
{
crosshairon = !crosshairon;
ragedc = GetDC(HWND_DESKTOP);
cx = GetSystemMetrics(SM_CXSCREEN) / 2 - ((crosshairsize - 1) / 2);
cy = GetSystemMetrics(SM_CYSCREEN) / 2 - ((crosshairsize - 1) / 2);
}
Sleep(1);
}
}
void Disable(void)
{
while (1)
{
if (GetAsyncKeyState(VK_DELETE) & 1)
{
crosshairon = 0;
}
}
}
int main()
{
cout << "Set crosshair size in pixle's:\n";
cin >> crosshairsize;
if (crosshairsize % 2 == 0)
{
crosshairsize += 1;
}
system("cls");
cout << "www.programs-sources.com Toggle insert to turn crosshair on and off\n";
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)CrossThread, 0, 0, 0);
while (1)
{
if (crosshairon == true)
{
for (int i = 0; i<crosshairsize; i++)
{
SetPixel(ragedc, cx + i, cy + ((crosshairsize - 1) / 2), orange);
SetPixel(ragedc, cx + ((crosshairsize - 1) / 2), cy + i, orange);
}
}
Sleep(1);
}
}
Have Fun!
Best Regards,
zan30