🔒 Closed C++ crosshair made by:jasper

Status
Not open for further replies.

WhiteListv2

Enthusiast
Code:
#include<Windows.h>

voidCrosshair(int iLength,int iWidth,DWORD dwColour);bool bDrawCrosshair=true;

int main(){while(!GetAsyncKeyState(VK_ESCAPE)){if(GetAsyncKeyState(VK_F2)&1){
bDrawCrosshair=!bDrawCrosshair;}if(bDrawCrosshair){Crosshair(100,4,0x888888);//change the arguments of this call to get the crosshair like you want it to be}}}


voidCrosshair(int iLength,int iThickness,DWORD dwColour){
HDC hDC=GetDC(NULL);int iSW,iSH;
iSH=GetSystemMetrics(1)/2;
iSW=GetSystemMetrics(0)/2;for(int i=-iThickness/2;i!=iThickness/2+1;++i){for(int j=0;j!=iLength;++j){SetPixel(hDC,iSW+i,iSH-iLength/2+j,dwColour);SetPixel(hDC,iSW-iLength/2+j,iSH+i,dwColour);}}}

CREDIT BY:JASPER
 
Status
Not open for further replies.

About this Thread

  • 6
    Replies
  • 848
    Views
  • 5
    Participants
Last reply from:
prideless22

Trending Topics

Online now

Members online
1,117
Guests online
13,525
Total visitors
14,642

Forum statistics

Threads
2,362,121
Posts
29,414,408
Members
1,056,825
Latest member
Ermahan_KZ
Back
Top