Jump to content

image on screen?


Recommended Posts

is there any way to create an image that runs inside of a full screen program, and set it to the co-ordinates you wish?

like for example.... say in diablo2 i wanted to set an image EXACTLY in the middle of the screen, so i can place my custom image around my character (dont ask lol, its a little project im doing) yet make it so when i click, it stays in diablo 2 and doesnt go back to the windows that arent full screen....

how would i go about this? is there some kinda control func that allows an image to be places on a screen of ur choice? or maybe a way to make an image always in the middle of ur screen, even on other windows too, but make it doesnt minimize fullscreen windows when you click?

please if someone could help me with this it'd be greatly appreceated

Link to comment
Share on other sites

Well...I'm sure there is a way to do it with the Windows API and DllCalls, but for the most part you don't want to, because it will blink every few milleseconds because of the Diablo screen redrawing itself. Blinking bitmaps are no good on the eyes.

In order to do this the way you want to, you need to *preferably* use code injection(dll injection is the most popular) and your going to want to hook into Diablo's back buffer and draw what you want in there with DirectX. Then it will draw it on the screen when the back buffer is flipped, and your code should do it again. Of course this is next to impossible in AutoIT(well, its possible, but definately not worth the trouble) and it would take quite a C++/ASM programmer to achieve this. Not even considering Warden would probably catch it within minutes.

So, to put it short, yes it is possible, but it will be ugly and not worth the effort looking up the functions on MSDN.

Link to comment
Share on other sites

Well...I'm sure there is a way to do it with the Windows API and DllCalls, but for the most part you don't want to, because it will blink every few milleseconds because of the Diablo screen redrawing itself. Blinking bitmaps are no good on the eyes.

In order to do this the way you want to, you need to *preferably* use code injection(dll injection is the most popular) and your going to want to hook into Diablo's back buffer and draw what you want in there with DirectX. Then it will draw it on the screen when the back buffer is flipped, and your code should do it again. Of course this is next to impossible in AutoIT(well, its possible, but definately not worth the trouble) and it would take quite a C++/ASM programmer to achieve this. Not even considering Warden would probably catch it within minutes.

So, to put it short, yes it is possible, but it will be ugly and not worth the effort looking up the functions on MSDN.

lol well warden isnt the problem.... i've figured out how to get around that a LONG time ago, the problem is getting the image to stay on the screen without minimizing full screen windows..... but im not actualy using this for D2, im just using D2 as an example.... im going to use it for DoD (day of defeat) to change the regular crosshairs

Link to comment
Share on other sites

In that case, look into some GDI functions on MSDN or win32 tutorials (Function X if I recall is where I learned).

If your wondering how to draw it on top of the screen, just redraw the cursor in a while(1) loop on the desktop's device context (hDC). You can google on how to get the desktop's device contect also!

EDIT: What you said about warden...was it actually you who figured out how to get around warden, or are you referring to one of Darawk's hidden dll injection methods...

Edited by Mason
Link to comment
Share on other sites

$y = @DesktopHeight / 2
$x = @DesktopWidth / 2
While 1
_TextOut($x,$y, "+")
Sleep(50)
Wend 

Func _TextOut($x,$y,$text)
    $hdc = DllCall("user32.dll","int","GetDC","hwnd",0)
    $hdc = $hdc[0]
    DllCall("gdi32.dll","int","TextOut","int",$hdc,"int",$x,"int",$y,"str",$text,"int",StringLen($text))
    DllCall("user32.dll","int","ReleaseDC","hwnd",0,"int",$hdc)
EndFunc

LOL.. Thats my custom crosshair..

I dont take credit for the _TextOut Function. I copied it from a post a long time ago. I think it was created by Larry.

Link to comment
Share on other sites

  • Moderators

To add an image or controls to another programs window, take a look at AnyGui by quiazzywabbit (I think that's how you spell it) in the search menu.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • 2 weeks later...

EDIT: What you said about warden...was it actually you who figured out how to get around warden, or are you referring to one of Darawk's hidden dll injection methods...

was me... lol warden isnt as hard as people think it is, people just dont know how to see whats right in front of there eyes B) lol it actualy took me a long time to but once i figured it out, i realised how damn easy it was and i just didnt notice it... but meh, i quit all blizzard games anyways, and ive since moved on to only FPS games (sometimes i do private realms for D2, but only 1.09)

Edited by TK_Incorperate
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...