Thread: Draw on screen

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    NoDuck's Avatar
    Join Date
    Sep 2015
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    1

    Question Draw on screen

    How do I draw on top of a game's window, so that it's hardly detectable?
    I currently use
    Code:
    FindWindow
    GetDC
    FillRect
    Are these detectable by the game?
    How do you draw on screen?

  2. #2
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    You use a marker.

  3. #3
    Raydenman's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Location
    Italy
    Posts
    261
    Reputation
    10
    Thanks
    810
    My Mood
    Amused
    Quote Originally Posted by NoDuck View Post
    How do I draw on top of a game's window, so that it's hardly detectable?
    I currently use
    Code:
    FindWindow
    GetDC
    FillRect
    Are these detectable by the game?
    How do you draw on screen?
    Detectable on WHAT?
    I still can't understand.
    FindWindow is part of user32.dll > win32 api.
    Anyway, on .net you need to do a p/invoke for it.

  4. #4
    NoDuck's Avatar
    Join Date
    Sep 2015
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    1
    Thanks for the replies

    Quote Originally Posted by ლ(ಠ_ಠლ) View Post
    You use a marker.
    You mean, like picking a pen and just drawing the ESP by hand directly on my screen?

    Quote Originally Posted by Raydenman View Post
    Detectable on WHAT?
    I still can't understand.
    FindWindow is part of user32.dll > win32 api.
    Anyway, on .net you need to do a p/invoke for it.
    I mean detectable by the game's anti-cheat, e.g. VAC.
    And I'm not on .NET, I use C++

  5. #5
    Raydenman's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Location
    Italy
    Posts
    261
    Reputation
    10
    Thanks
    810
    My Mood
    Amused
    Quote Originally Posted by NoDuck View Post
    Thanks for the replies


    You mean, like picking a pen and just drawing the ESP by hand directly on my screen?


    I mean detectable by the game's anti-cheat, e.g. VAC.
    And I'm not on .NET, I use C++
    That functions have nothing to do with anti-cheat detecting ...

  6. #6
    NoDuck's Avatar
    Join Date
    Sep 2015
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Raydenman View Post
    That functions have nothing to do with anti-cheat detecting ...
    But when the anti-cheat detects that my hack draws on top of the game's window, it may find it suspicious and for example make a screenshot or scan my hack.

  7. #7
    Raydenman's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Location
    Italy
    Posts
    261
    Reputation
    10
    Thanks
    810
    My Mood
    Amused
    Quote Originally Posted by NoDuck View Post
    But when the anti-cheat detects that my hack draws on top of the game's window, it may find it suspicious and for example make a screenshot or scan my hack.
    Can you post the code?

  8. #8
    NoDuck's Avatar
    Join Date
    Sep 2015
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Raydenman View Post
    Can you post the code?
    The drawing code is kind of spread throughout my code (I should rework and encapsulate it in a way) but I basically use this:
    Code:
    HWND hWnd = FindWindow(NULL, "<gameWnd's name>");
    HDC hDC = GetDC(hWnd);
    
    HBRUSH hBrush = CreateSolidBrush(RGB(r, g, b));
    RECT rect = { x, y, x + w, y + h };
    FillRect(hDC, &rect, hBrush);

  9. #9
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Quote Originally Posted by NoDuck View Post
    You mean, like picking a pen and just drawing the ESP by hand directly on my screen?
    Exactly. It's 100% undetectable and will never be.

  10. #10
    Raydenman's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Location
    Italy
    Posts
    261
    Reputation
    10
    Thanks
    810
    My Mood
    Amused
    Quote Originally Posted by NoDuck View Post
    The drawing code is kind of spread throughout my code (I should rework and encapsulate it in a way) but I basically use this:
    Code:
    HWND hWnd = FindWindow(NULL, "<gameWnd's name>");
    HDC hDC = GetDC(hWnd);
    
    HBRUSH hBrush = CreateSolidBrush(RGB(r, g, b));
    RECT rect = { x, y, x + w, y + h };
    FillRect(hDC, &rect, hBrush);
    I'm sorry but I don't know how the "Anti-cheat" works.
    You need to create a brush using that function, "indispensable".
    I can only tell you a precision: when you don't need anymore the object hbrush, call deleteobject which deletes gdi objects.

  11. The Following User Says Thank You to Raydenman For This Useful Post:

    NoDuck (09-02-2015)

  12. #11
    NoDuck's Avatar
    Join Date
    Sep 2015
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Raydenman View Post
    I'm sorry but I don't know how the "Anti-cheat" works.
    You need to create a brush using that function, "indispensable".
    I can only tell you a precision: when you don't need anymore the object hbrush, call deleteobject which deletes gdi objects.
    Okay, thanks

    Would you recommend me to use GDI or do you know better techniques?

  13. #12
    Raydenman's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Location
    Italy
    Posts
    261
    Reputation
    10
    Thanks
    810
    My Mood
    Amused
    Quote Originally Posted by NoDuck View Post
    Okay, thanks

    Would you recommend me to use GDI or do you know better techniques?
    mmm... I dunno so much "better techniques", but GDI+ is not so much hardware accelerated.

  14. #13
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Quote Originally Posted by NoDuck View Post
    Okay, thanks

    Would you recommend me to use GDI or do you know better techniques?
    D3D or opengl or well, whatever else.

  15. #14
    Raydenman's Avatar
    Join Date
    Nov 2013
    Gender
    male
    Location
    Italy
    Posts
    261
    Reputation
    10
    Thanks
    810
    My Mood
    Amused
    Quote Originally Posted by ლ(ಠ_ಠლ) View Post


    D3D or opengl or well, whatever else.
    Opengl is not even a library, it's a low level drawing api.
    It doesn't even support networking, sound, input devices like mouse etc.
    And, opengl is equivalent to direct3d; direct3d= an object oriented 3d graphics library.
    I would choose OpenGl for non-microsoft platforms.

  16. #15
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Quote Originally Posted by Raydenman View Post
    Opengl is not even a library, it's a low level drawing api.
    It doesn't even support networking, sound, input devices like mouse etc.
    And, opengl is equivalent to direct3d; direct3d= an object oriented 3d graphics library.
    I would choose OpenGl for non-microsoft platforms.
    I think am missing the point of your post. He can of course use both of them and even other APIs to draw ESP on the screen without even thinking about GDI.

Page 1 of 2 12 LastLast

Similar Threads

  1. Drawing a few pixels to the screen
    By Bottastic in forum C# Programming
    Replies: 3
    Last Post: 10-07-2012, 07:28 AM
  2. Drawing Text to the Screen...
    By 258456 in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 14
    Last Post: 12-01-2011, 04:43 PM
  3. [Help] Drawing pixels on screen?[Solved]
    By master131backup in forum Visual Basic Programming
    Replies: 14
    Last Post: 11-04-2010, 02:55 AM
  4. [HELP] Draw direct to screen.
    By Jason in forum Visual Basic Programming
    Replies: 6
    Last Post: 07-25-2010, 11:35 AM
  5. [Release + Source] Using GDI+ to draw a dot on the screen
    By Erinador in forum Visual Basic Programming
    Replies: 19
    Last Post: 01-11-2010, 08:32 PM