|
-
Jan 18th, 2003, 10:33 PM
#1
Thread Starter
Conquistador
Drawing a dot on the screen
I was wondering if there was any code to draw a dot at the exact middle of my screen, of a set radius and color, that will remain there no matter whether my program is on top or not - i want it to be always present, any idea?
any idea if it's possible?
-
Jan 19th, 2003, 02:48 AM
#2
Addicted Member
Well, you would just have to make a loop which draws the dot all the time, something like this i think:
VB Code:
lDc = GetDc(0)
Xpos = (screenwidth / 2) * 15
Ypos = (screen.height / 2) * 15
do
SetPixel lDc,Xpos,Ypos
doevents
loop
This might work, i didn't test it though 
Shell
-
Jan 19th, 2003, 04:53 AM
#3
Thread Starter
Conquistador
thanks but i was looking for something a little less resource intensive
-
Jan 19th, 2003, 08:34 AM
#4
Frenzied Member
If you use a timer with an interval of, say, 200ms, it should look good enough and still not be too resource-intensive
-
Jan 19th, 2003, 01:18 PM
#5
Ex-Super Mod'rater
Rather than doing each pixel at a time with the SetPixel you'll be better using BitBlt to paint it to the center. Mind you'll still need to keep blt'in quite often because when the window refreshes the screen it'll remove it.
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
Jan 19th, 2003, 01:21 PM
#6
Frenzied Member
Yeah you're right, it's a dot of a set RADIUS so SetPixel would be best only if the radius is 1...
-
Jan 19th, 2003, 01:22 PM
#7
Good Ol' Platypus
Do yourself a favour - if you're using it for an aim, be cheap and get one of those red dot stickers, use a ruler to get the middle of your screen and stick it right there. It's not worth trying to make it on the computer .
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Jan 19th, 2003, 01:27 PM
#8
Ex-Super Mod'rater
LOL, how come it has to be red tho i want a green one
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
Jan 19th, 2003, 01:33 PM
#9
Good Ol' Platypus
I don't think they come in green >_<
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Jan 19th, 2003, 01:36 PM
#10
-
Jan 19th, 2003, 03:44 PM
#11
Addicted Member
Heh Jotaf, I was just thinking about that. I tested it, and it works
-
Jan 19th, 2003, 06:47 PM
#12
-
Jan 19th, 2003, 06:59 PM
#13
Good Ol' Platypus
2 forms? Not up to "complex" form regioning Jotaf?
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Jan 19th, 2003, 11:14 PM
#14
Thread Starter
Conquistador
Well i tried these methods and they didn't seem to be ontop inside the game 
is there any way in which i could do the same in C, to put it on the screen in game?
-
Jan 20th, 2003, 02:44 AM
#15
Member
what is your object anyway. a crosshair ???
|
--- ---
|
 ppl saw this
Die, ***** Die !
-
Jan 20th, 2003, 03:00 AM
#16
Thread Starter
Conquistador
-
Jan 20th, 2003, 07:46 AM
#17
Member
draw it dynamically, this way u'll only upset the fps and nothing else. trust me ,its much better
 ppl saw this
Die, ***** Die !
-
Jan 20th, 2003, 09:45 AM
#18
Frenzied Member
If you make it stay on top, Windows will redraw it for you I think. There are lots of demos around so you shouldn't have any trouble finding one.
(BTW, way off topic but hey am I that bad at english? Because my teacher just gave me a bad mark, she says she doesn't like the way I write...)
-
Jan 20th, 2003, 09:49 AM
#19
Thread Starter
Conquistador
the on top method doesn't work with the game
is there any way i can do it in C / C++?
-
Jan 20th, 2003, 10:06 AM
#20
Frenzied Member
What the hell do you need a new crosshair for?? When you're supposed to have one in a game, you usually don't have to make it yourself...
Btw, if the game is in directx I don't think there's a way to do it. And something like this if you can't do it in VB, you can't do it in C++ either, the windows API is the same for both. Unless you wanna use ASM and do something like accessing the video memory directly or something. But that's not C++ and you DON'T wanna do that just to draw a crosshair cuz you can't aim.
-
Jan 20th, 2003, 10:10 AM
#21
-
Jan 20th, 2003, 10:24 AM
#22
Thread Starter
Conquistador
lol actually
the game i play does have a crosshair permanently except it's not at the center of the screen 
I think the game does use DirectX too (OpenGL?)
Any ideas?
-
Jan 20th, 2003, 10:32 AM
#23
-
Jan 20th, 2003, 11:04 AM
#24
Great shooters don't use crosshair....
So I keep using it...
-
Jan 20th, 2003, 11:16 AM
#25
Thread Starter
Conquistador
I'm still looking for an answer though.
And btw; it is Counterstrike
-
Jan 20th, 2003, 11:24 AM
#26
As Jotaf98 said..have you tryed too contact tech support or something? Or don't you own the copy????
-
Jan 20th, 2003, 02:48 PM
#27
-
Jan 20th, 2003, 04:55 PM
#28
Addicted Member
Well it *is* possible to draw onto a fullscreen game, infact a certain trainer for mafia draws a graphical menu in real time.
I have also wondered how this could be accomplished, i did some enquiring a few months ago and i was suggested to "set up a DirectX outpost to draw on this window." - his exact words. Unfortunately i havent got any further, if you find out anything else please let me know
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|