Page 1 of 1

how to set an application on top of games

Posted: Fri Oct 22, 2010 11:49 pm
by rookie1
Hi
I'm trying to create an application that would stay on top while playing games. Is this possible to do something like this in PureBasic, but for games that were not created in it (preferably for any game)?
Thank you.

Re: how to set an application on top of games

Posted: Sat Oct 23, 2010 12:52 am
by IdeasVacuum
Hello Rookie1

You can use StickyWindow() to do that.

http://www.purebasic.com/documentation/ ... indow.html

Re: how to set an application on top of games

Posted: Sat Oct 23, 2010 2:26 am
by PureLust
IdeasVacuum wrote:You can use StickyWindow() to do that.
But bear in mind, that StickyWindow() will not be usable if the Game is running in Fullscreen-Mode.

To put something on top of a fullsize DirectX-Screen, you have to do it by an DirectDraw-Overlay, which is "quite a bit" more complicated. ;)

Eventhough its not really made for PB-Beginners, maybe THIS Overlay-Example from Stefan could be helpfull.
Stefan wrote:; Show an overlay on top of a (Direct3D) image, e.g. a game...
; Note: not every gfx card support this feature

; Über einem bestehenden (Direct3D-)Bild (z.B. einem Spiel) ein Overlay anzeigen:
; Achtung: Nicht jede Grafikkarte unterstüzt Overlays.
(LINK to the Thread in the german PureBasic-Forum.)

Because it's using DirectX7, you have to set the "Library Subsystem" in the PB Compiler-Options to "DirectX7".

Greetz and good luck, PL.

Re: how to set an application on top of games

Posted: Sat Oct 23, 2010 3:57 pm
by Fluid Byte
Don't use that, it's worthless. As you can see the thread is very long and I post a lot there.
I have analysed that thing back and forth and besides using DirectX 7 (which is simply a no-go these days)
the desktop resolution has to be identical to the resolution of your game. Also if you Alt-Tab from your game,
overlay destroyed. Change resolution of your game, overlay destroyed. Keep your hands of this one, just leads to trouble.

I know you want something like the overlay used in Steam games which quite handy.
So you need to check out this thread: http://www.purebasic.fr/english/viewtop ... 13&t=38283
There info about an external DLL and extra code which show how to inject it.

Re: how to set an application on top of games

Posted: Sat Oct 23, 2010 11:41 pm
by rookie1
thanks for replies guys.

Fluid Byte, the material found after following your link seems to be exactly what I was looking for.
Unfortunately I've never made any Directx programming until now, so it will take a while until i can put those functions at good use. Seems that my idea is a little harder to put in practice than expected :)
But this is exactly the head start I needed, saving me from many more hours of Net searching.
I will post any news on the project as it develops, but it will take some time as I'm in the process of learning PHP and Italian language too :D