• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sipping
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 5 of 5
    1. #1
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Oskars's Avatar
      Join Date
      Sep 2017
      Posts
      48
      Thanks (-->)
      11
      Thanks (<--)
      10

      GDI what am I doing wrong?

      How to Call Game Functions
      Guy's, I don't understand what am I doing wrong here. I'm trying to CP(Fleep) a working code so I can learn how to make 1 myself later.
      I have Win 10.

      #include <iostream>
      #include <Windows.h>

      RECT WindowRect;
      HWND Handle; // handle to our window
      HDC HDC_Desktop;
      //Brush to paint ESP etc
      HBRUSH ColorBrush;
      DWORD DwProcId;
      //The handle we use to read memory
      HANDLE HProcHandle;
      HBRUSH Friendly;
      HBRUSH Enemy;
      COLORREF FriendlyCol;
      COLORREF EnemyCol;
      int resolution[2];
      bool GotRes = false;
      int screencenter[2];
      void DrawFilledRect(HDC hdc, HBRUSH hbrush, int x, int y, int w, int h)
      {
      //We create our rectangle to draw on screen
      RECT rect = { x, y, x + w, y + h };
      FillRect(hdc, &rect, hbrush);
      }
      void DrawBorderBox(HDC hdc, HBRUSH hbrush, int x, int y, int w, int h, int thickness)
      {
      //Top horiz line
      DrawFilledRect(hdc, hbrush, x, y, w, thickness);
      //Left vertical line
      DrawFilledRect(hdc, hbrush, x, y, thickness, h);
      //right vertical line
      DrawFilledRect(hdc, hbrush, (x + w), y, thickness, h);
      //bottom horiz line
      DrawFilledRect(hdc, hbrush, x, y + h, w + thickness, thickness);
      }

      void Setup(HDC hdesktop, HWND handle, HANDLE hProcHandle)
      {
      //Assign our Drawing device
      //This is our default color brush
      ColorBrush = CreateSolidBrush(RGB(0, 0, 255));
      HDC_Desktop = hdesktop;
      //This is the handle to the GAME Name we choose at the beginning
      Handle = handle;
      HProcHandle = hProcHandle;
      //Define what colours are being used
      Friendly = CreateSolidBrush(RGB(0, 255, 0));
      Enemy = CreateSolidBrush(RGB(255, 0, 0));
      //Color
      EnemyCol = (RGB(255, 0, 0));
      FriendlyCol = (RGB(0, 255, 0));
      }

      void main()
      {
      /* hide console window */
      ShowWindow(FindWindowA("ConsoleWindowClass", NULL), false);
      HWND hWnd = FindWindow(0, "Discord");
      HDC hDC_Desktop = GetDC(hWnd);
      DWORD dwProcId;
      HANDLE hProcHandle;
      GetWindowThreadProcessId(hWnd, &dwProcId);
      hProcHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwProcId);
      Setup(hDC_Desktop, hWnd, hProcHandle);
      while (!GetAsyncKeyState(VK_INSERT))
      {
      DrawBorderBox(HDC_Desktop, Enemy, 5, 5, 1000, 180, 4); // Didnt change anything if it was Enemy, Or Friendly
      Sleep(80);
      }

      }


    2. #2
      Global Moderator
      Beware the dragonborn
       
      Sipping
       
      Teuvin's Avatar
      Join Date
      Dec 2016
      Location
      Brazil
      Posts
      245
      Thanks (-->)
      70
      Thanks (<--)
      89
      Exactly, what are you doing wrong?
      What is the problem? Is it not drawing, flicking what?
      GDI what am I doing wrong?

    3. #3
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Oskars's Avatar
      Join Date
      Sep 2017
      Posts
      48
      Thanks (-->)
      11
      Thanks (<--)
      10
      Quote Originally Posted by Teuvin View Post
      Exactly, what are you doing wrong?
      What is the problem? Is it not drawing, flicking what?
      Forgot to add the problem XD. It's not drawing at all.

    4. #4
      Coder
      explode strings
       
      Lagging
       
      Lukor's Avatar
      Join Date
      Dec 2013
      Posts
      171
      Thanks (-->)
      36
      Thanks (<--)
      33
      Please debug your code and find out where it is stuck.
      You need to check wether it finds the window, it creates the brushes, it creates the GDI device and so on.
      Log every step until you know where it blocks.
      I'm a simple man. I see a good post, i press "Thank for this post".

    5. Thanks Oskars thanked for this post
    6. #5
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Oskars's Avatar
      Join Date
      Sep 2017
      Posts
      48
      Thanks (-->)
      11
      Thanks (<--)
      10
      Advertise on GuidedHacking
      Fixed It Thank's.

    Similar Game Hacker Threads

    1. [Help] Something wrong with my RCS for CS:GO
      By SuchJitter in forum Hacking Help
      Replies: 2
      Last Post: 07-31-2017, 08:04 AM
    2. [Help] Wrong Output
      By simonpaa in forum Hacking Help
      Replies: 8
      Last Post: 02-13-2016, 12:23 PM
    3. Replies: 6
      Last Post: 01-25-2016, 03:23 PM
    4. [Help] What is it that I'm doing wrong?
      By xheva in forum Hacking Help
      Replies: 1
      Last Post: 01-18-2015, 05:51 AM
    5. [Help] [C#] What's wrong with my W2S?
      By motherflufferr in forum Hacking Help
      Replies: 2
      Last Post: 12-03-2014, 12:14 PM