Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[Delphi] Form in windowed game help.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Wed Feb 20, 2008 8:16 am    Post subject: [Delphi] Form in windowed game help. Reply with quote

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
View user's profile Send private message
Renkokuken
GO Moderator
Reputation: 4

Joined: 22 Oct 2006
Posts: 3249

PostPosted: Wed Feb 20, 2008 9:45 am    Post subject: Reply with quote

A directx hook is fine too.
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Wed Feb 20, 2008 10:05 am    Post subject: Reply with quote

Renkokuken wrote:
A directx hook is fine too.

Any tutorials on that?
Back to top
View user's profile Send private message
Renkokuken
GO Moderator
Reputation: 4

Joined: 22 Oct 2006
Posts: 3249

PostPosted: Wed Feb 20, 2008 10:08 am    Post subject: Reply with quote

Moller wrote:
Renkokuken wrote:
A directx hook is fine too.

Any tutorials on that?
http://forum.gamedeception.net/
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Wed Feb 20, 2008 10:10 am    Post subject: Reply with quote

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
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Feb 20, 2008 7:30 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Thu Feb 21, 2008 12:29 am    Post subject: Reply with quote

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
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Thu Feb 21, 2008 2:29 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Thu Feb 21, 2008 7:52 am    Post subject: Reply with quote

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
View user's profile Send private message
thexav
Master Cheater
Reputation: 0

Joined: 10 Nov 2006
Posts: 402
Location: quebec, canada

PostPosted: Fri Feb 22, 2008 9:02 am    Post subject: Reply with quote

cool, works alright
_________________
Back to top
View user's profile Send private message MSN Messenger
Fisk
Grandmaster Cheater
Reputation: 0

Joined: 18 Mar 2007
Posts: 711
Location: rymdsylt

PostPosted: Fri Feb 22, 2008 3:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites