"Draw" on screen?

c, c++, php, html, sql ..etc discussion. also includes codes and source codes.
Post Reply
Ritterkreuzträger
Allie
Allie
Posts: 105
Joined: Tue Jan 12, 2010 2:59 pm

"Draw" on screen?

Post by Ritterkreuzträger »

I was making something game-related(hack\cheat or just some pointless shit :D Just experimenting). I was in need to draw something on screen(monitor, HDC), but it looks like in pascal there are only one famous enough method to draw something - to use TCanvas component. Its quiet powerful(And very easy to use - just like TCanvas.TextOut, TCanvas.Rectangle etc), but not enough for gaming purposes. The drawn thing will be erased with every screen update, so you have to redraw it. I made a timer for 1MSec, but it is not enough - the drawn thing will be blinking very fast, which is very annoying. Im not in need to see a solution on pascal, it can be written in C or in anything else(Im sure there are most be just few WinAPI functions). It is not needed to affect the application in any way, may be some kind of overlay...
User avatar
Sethioz
Admin
Admin
Posts: 4764
Joined: Fri Jul 27, 2007 5:11 pm
Custom: Gaming YT > https://youtube.com/SethiozEntertainment
Game Hacking YT > https://youtube.com/sethioz
Game Hacks Store > https://sethioz.com/shopz
Location: unknown
Contact:

Re: "Draw" on screen?

Post by Sethioz »

sounds like the universal crosshair that TeamRetox wrote, which is blinking. its quite cool on crosshair, makes it easier to notice.
how about example code and tools ?
Ritterkreuzträger
Allie
Allie
Posts: 105
Joined: Tue Jan 12, 2010 2:59 pm

Re: "Draw" on screen?

Post by Ritterkreuzträger »

As about code - this is just too easy, there are no any real point to write it here... TCanvas - is pascal in-built library component. Can be used like this - for example, if you want some text to be displayed on window\whole monitor you have to write some initializing code and after this to use TCanvas component - TCanvas.TextOut(Y, X, String) (As about TextOut - analogue for WinAPI function, which is very similar - TextOut(DC: HDC; X, Y: Integer; Str: PChar; Count: Integer)). Y and X are pixels. String - the text. I can write my own analogue of TCanvas, but it is not really needed - there are will stay the same problem with "blinking"(i just dont know how to avoid erasing thing).
User avatar
Sethioz
Admin
Admin
Posts: 4764
Joined: Fri Jul 27, 2007 5:11 pm
Custom: Gaming YT > https://youtube.com/SethiozEntertainment
Game Hacking YT > https://youtube.com/sethioz
Game Hacks Store > https://sethioz.com/shopz
Location: unknown
Contact:

Re: "Draw" on screen?

Post by Sethioz »

i will take a look into it when i get a chance, probably in month.
Post Reply