| View previous topic :: View next topic |
| Author |
Message |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Wed Feb 20, 2008 8:16 am Post subject: [Delphi] Form in windowed game help. |
|
|
Hey guys.
I'm trying to make a "bot" for Trickster Online, and I want the bot form, to be inside the game screen.
So I found this code, on Extalia.com.
| Code: | var
Gamehwnd: HWND;
pstyle: DWORD;
begin
Gamehwnd := FindWindow(Nil, 'Kingdom of Drakkar (4.1r1)');
pstyle := GetWindowLong(Gamehwnd, GWL_STYLE);
pstyle := pstyle or WS_CLIPCHILDREN;
SetWindowLong(Gamehwnd, GWL_STYLE, pstyle);
Windows.SetParent(Form1.Handle, Gamehwnd);
SetWindowPos(Form1.Handle, HWND_TOP, 100, 100, 500, 100, SWP_NOSIZE or SWP_NOMOVE); |
Credits to Raiko @ Extalia Forum
But, when I executes my Delphi project EXE, it gets inside the game, but it looks bugged (only shows a part of the form).
So here's my question, does any of you know a better way to do it, or do you know if there's anything I should change, on form, to make it work.
- Møller
|
|
| Back to top |
|
 |
Renkokuken GO Moderator
Reputation: 4
Joined: 22 Oct 2006 Posts: 3249
|
Posted: Wed Feb 20, 2008 9:45 am Post subject: |
|
|
| A directx hook is fine too.
|
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Wed Feb 20, 2008 10:05 am Post subject: |
|
|
| Renkokuken wrote: | | A directx hook is fine too. |
Any tutorials on that?
|
|
| Back to top |
|
 |
Renkokuken GO Moderator
Reputation: 4
Joined: 22 Oct 2006 Posts: 3249
|
Posted: Wed Feb 20, 2008 10:08 am Post subject: |
|
|
| Moller wrote: | | Renkokuken wrote: | | A directx hook is fine too. |
Any tutorials on that? | http://forum.gamedeception.net/
|
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Wed Feb 20, 2008 10:10 am Post subject: |
|
|
| Renkokuken wrote: | | Moller wrote: | | Renkokuken wrote: | | A directx hook is fine too. |
Any tutorials on that? | http://forum.gamedeception.net/ |
I'll look it through, thanks.
EDIT: Haven't looked it all through yet, but isn't that for C?
EDIT2: Found some Delphi tuts.
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Wed Feb 20, 2008 7:30 pm Post subject: |
|
|
Look in the General Programming+ section also, I wrote a tutorial thats posted in there about wrapping DirectX 9 to take control of everything.
_________________
- Retired. |
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Thu Feb 21, 2008 12:29 am Post subject: |
|
|
| Wiccaan wrote: | | Look in the General Programming+ section also, I wrote a tutorial thats posted in there about wrapping DirectX 9 to take control of everything. |
I've seen that, but I've never ever messed with C++, or what the language was, so it'll might be hard for me to convert it to Delphi.
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Thu Feb 21, 2008 2:29 am Post subject: |
|
|
| Moller wrote: | | Wiccaan wrote: | | Look in the General Programming+ section also, I wrote a tutorial thats posted in there about wrapping DirectX 9 to take control of everything. |
I've seen that, but I've never ever messed with C++, or what the language was, so it'll might be hard for me to convert it to Delphi. |
Not that hard, just the basics you need for it is writing API hooks and creating a DirectX wrapper, which I'm sure you can find one written in Delphi, or convert it fairly easy. All you are doing with the wrapper is "proxying" the calls that are made to the Direct3D device. Most you will have to do is just change param types and some syntax.
_________________
- Retired. |
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Thu Feb 21, 2008 7:52 am Post subject: |
|
|
| Wiccaan wrote: | | Moller wrote: | | Wiccaan wrote: | | Look in the General Programming+ section also, I wrote a tutorial thats posted in there about wrapping DirectX 9 to take control of everything. |
I've seen that, but I've never ever messed with C++, or what the language was, so it'll might be hard for me to convert it to Delphi. |
Not that hard, just the basics you need for it is writing API hooks and creating a DirectX wrapper, which I'm sure you can find one written in Delphi, or convert it fairly easy. All you are doing with the wrapper is "proxying" the calls that are made to the Direct3D device. Most you will have to do is just change param types and some syntax. |
This might to be too much to ask for, but since I don't really know what to look for, could you find me a tutorial, or a place to ask for a tutorial?
|
|
| Back to top |
|
 |
thexav Master Cheater
Reputation: 0
Joined: 10 Nov 2006 Posts: 402 Location: quebec, canada
|
Posted: Fri Feb 22, 2008 9:02 am Post subject: |
|
|
cool, works alright
_________________
|
|
| Back to top |
|
 |
Fisk Grandmaster Cheater
Reputation: 0
Joined: 18 Mar 2007 Posts: 711 Location: rymdsylt
|
Posted: Fri Feb 22, 2008 3:19 pm Post subject: |
|
|
| Moller wrote: | | This might to be too much to ask for, but since I don't really know what to look for, could you find me a tutorial, or a place to ask for a tutorial? |
www.google.com
|
|
| Back to top |
|
 |
|