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 


how to insert application into the games GUI
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
pkedpker
Master Cheater
Reputation: 1

Joined: 11 Oct 2006
Posts: 412

PostPosted: Tue Apr 15, 2008 11:04 am    Post subject: Reply with quote

Code:

void DrawMyText(char *windowcaption, float x, float y, char *mybuffer, int howmany)
{
   gamewindowhandle = FindWindow(NULL, windowcaption); //get the game hwnd
   HDC hdc = GetDC(gamewindowhandle);

   SetBkColor(hdc,RGB(255,255,255));                   //WHITE BACKGROUND
   SetBkMode(hdc, TRANSPARENT);                        //MAKES BACKGROUND TRANSPARENT
                                                            //SO ALL YOU SEE IS THE TEXT
   //MAKE SHADOW FOR TEXT (BLACK) and offset it by 1 pixel
   SetTextColor(hdc,RGB(0,0,0));     
        TextOut(hdc,x+1,y+1, mybuffer,howmany);

   //MAKE SECOND SHADOW FOR TEXT (BLACK) and offset it by 2 pixels
        TextOut(hdc,x+2,y+2, mybuffer,howmany);


   //PRINTS MY TEXT OVER THE BLACK TEXT IN RED, GIVES IT A DROP SHADOW APPEARANCE.
   SetTextColor(hdc,RGB(255,0,0));   
        TextOut(hdc,x,y, mybuffer,howmany);

   UpdateWindow(gamewindowhandle);
   ReleaseDC(gamewindowhandle,hdc);
}


its in C++

here is example of usage:

char buff[255];

buff = "Test of text";

DrawMyText("MapleStory",155,35,"Underground Hack",16);
//or
DrawMyText("MapleStory",155,35,buff,3);
Back to top
View user's profile Send private message
NothingToShow
Grandmaster Cheater Supreme
Reputation: 0

Joined: 11 Jul 2007
Posts: 1579

PostPosted: Tue Apr 15, 2008 1:28 pm    Post subject: Reply with quote

pkedpker:
Thanks for the source, I converted it to Delphi:
Code:
Procedure DrawMyText(windowcaption : string; x,y : integer; mybuffer: pansichar; howmany : integer);
var
gamewindowhandle : hwnd;
hd : HDC;
begin
gamewindowhandle := FindWindow(nil, @windowcaption);
hd := GetDC(gamewindowhandle);

   SetBkColor(hd, RGB(255, 255, 255));                   //WHITE BACKGROUND
   SetBkMode(hd, TRANSPARENT);                        //MAKES BACKGROUND TRANSPARENT
                                                            //SO ALL YOU SEE IS THE TEXT
   //MAKE SHADOW FOR TEXT (BLACK) and offset it by 1 pixel
   SetTextColor(hd,RGB(0,0,0));
        TextOut(hd, x+1, y+1, mybuffer, howmany);

   //MAKE SECOND SHADOW FOR TEXT (BLACK) and offset it by 2 pixels
        TextOut(hd, x+2, y+2, mybuffer, howmany);


   //PRINTS MY TEXT OVER THE BLACK TEXT IN RED, GIVES IT A DROP SHADOW APPEARANCE.
   SetTextColor(hd, RGB(255, 100, 0));
        TextOut(hd, x, y, mybuffer, howmany);

   UpdateWindow(gamewindowhandle);
   ReleaseDC(gamewindowhandle, hd);
end;

Please tell me errors.
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Tue Apr 15, 2008 7:10 pm    Post subject: Reply with quote

GDI overlays will cause flickering.
_________________
Back to top
View user's profile Send private message
Omega-Assassin
Newbie cheater
Reputation: 0

Joined: 11 Apr 2008
Posts: 16

PostPosted: Tue Apr 15, 2008 9:10 pm    Post subject: Reply with quote

Wiccaan wrote:
Omega-Assassin wrote:
thats delphi? Confused wow... I feel like a noob now lmao... then again I have never seen delphi scripts before... so I don't feel to bad :-/


Just look at the API that was used in the post and convert it to your language. Shouldn't be hard to do that.


this is I'm just learning C++ I have programming knowledge in VB6 mostly since its what I started on when i first began. C++ looks like a complicated language to learn and I look forward to the challenge. I just need to learn some of the basics first then figure out the more advanced details of the language.

_________________
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Wed Apr 16, 2008 12:51 am    Post subject: Reply with quote

hey, pkedpker, thanks, but i got a few problems

Quote:
cannot convert parameter 4 from 'char *' to 'LPCWSTR'


i get that error, i know you can use L"your string", but i don't know how to use it for variables, because it just makes it into a different variable

cant you help me?

_________________
Back to top
View user's profile Send private message
Omega-Assassin
Newbie cheater
Reputation: 0

Joined: 11 Apr 2008
Posts: 16

PostPosted: Fri Apr 18, 2008 6:55 pm    Post subject: Reply with quote

x0r wrote:
sponge wrote:
GDI overlays will cause flickering.

Stop talking of things you know nothing about. GDI overlays can be executed well, if you wish for proof look at SEX (shooting lines done with GDI, no flicker).



you should speak softly when talking about things you aren't sure of yourself... someone like me might decide to put you on the spot and test the knowledge you claim to obtain... granted i don't know a great deal about the form of gap (graphical application programming) that you guys work on but i do know a great deal about system operations and what it takes to cause lag/ig "flickering"( in-game "flickering")... tread lightly on what you say and to whom you choose to say it to

_________________
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Fri Apr 18, 2008 6:59 pm    Post subject: Reply with quote

Snootae wrote:
hey, pkedpker, thanks, but i got a few problems

Quote:
cannot convert parameter 4 from 'char *' to 'LPCWSTR'


i get that error, i know you can use L"your string", but i don't know how to use it for variables, because it just makes it into a different variable

cant you help me?


change the paramter from char * to TCHAR *

_________________
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Fri Apr 18, 2008 7:34 pm    Post subject: Reply with quote

Just hook DirectX from an injected dll and use AntTweakBar.
Back to top
View user's profile Send private message
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Fri Apr 18, 2008 11:10 pm    Post subject: Reply with quote

I remember seeing a tut + code on this over at gamedev...can't seem to find it now, though.
Back to top
View user's profile Send private message
Omega-Assassin
Newbie cheater
Reputation: 0

Joined: 11 Apr 2008
Posts: 16

PostPosted: Sat Apr 19, 2008 5:17 am    Post subject: Reply with quote

x0r wrote:
Omega-Assassin wrote:
you should speak softly when talking about things you aren't sure of yourself... someone like me might decide to put you on the spot and test the knowledge you claim to obtain... granted i don't know a great deal about the form of gap (graphical application programming) that you guys work on but i do know a great deal about system operations and what it takes to cause lag/ig "flickering"( in-game "flickering")... tread lightly on what you say and to whom you choose to say it to

Haha, I'm so sorry sir. I had completely failed to acknowledge the fact that you're a professional when it comes to system operations. That's why you didn't even know about the basics of system modules, that's also why you're using .NET which attempts to abstract itself from the operating system and use a general-purpose library!

So please, put me on the spot and test my knowledge, whilst I test yours Smile

Oh yeah, this is what you want. Run off, idiot.


a bit cocky i see. if you would pay attention and read my post before you reply with stupidity you would have understood that i said "i know a great deal about system operations" in such i know more about how they run and whats makes them "tick" not how to make top of the line software for them. you can test my knowledge all you want and it wont change the fact that your a cocky little prick that seems to enjoy pushing people around on forums. oh and genius if you were paying attention that link has already been posted to me and its not what im looking for. iv already played with that garbage. it takes quick window caps of the program selected to put a picture box with the program in it and puts it over a full-screen game. thats all its good for is quick application shots.


NOTE: i came here looking for help on my learning venture... not to argue with idiots over who knows what. so if your going to give me shit or someone thats trying to help... put it in the private message

_________________
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Sat Apr 19, 2008 8:43 am    Post subject: Reply with quote

Heads up: Irwin and Wiccan prolly have the most knowledge of windows on this forum. Irwin(x0r) is very well read-up and has practical experience with r0 and r3 and how it all works.
_________________
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Sat Apr 19, 2008 9:09 am    Post subject: Reply with quote

blankrider wrote:
Heads up: Irwin and Wiccan prolly have the most knowledge of windows on this forum. Irwin(x0r) is very well read-up and has practical experience with r0 and r3 and how it all works.


Wiccaan*, and thanks for the compliment. It pays to have no life and do nothing but read shit all day lol.

On-topic: Chill out with the arguments. We don't need this to turn into a flame fest. This forum is not to show who has more knowledge in a certain section of anything. It is for coding support.

Get back on topic or I will close this thread, issue warns, etc.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sat Apr 19, 2008 1:52 pm    Post subject: Reply with quote

I repeat:

Inject AntTweakBar

Also, even though Wiccaan has a great knowledge base for ring 3 programming, I don't think he has ventured into ring 0. How can he be an expert on windows if he has never done anything with the kernel? Confused
Back to top
View user's profile Send private message
Omega-Assassin
Newbie cheater
Reputation: 0

Joined: 11 Apr 2008
Posts: 16

PostPosted: Sat Apr 19, 2008 6:47 pm    Post subject: Reply with quote

Wiccaan wrote:
blankrider wrote:
Heads up: Irwin and Wiccan prolly have the most knowledge of windows on this forum. Irwin(x0r) is very well read-up and has practical experience with r0 and r3 and how it all works.


Wiccaan*, and thanks for the compliment. It pays to have no life and do nothing but read shit all day lol.

On-topic: Chill out with the arguments. We don't need this to turn into a flame fest. This forum is not to show who has more knowledge in a certain section of anything. It is for coding support.

Get back on topic or I will close this thread, issue warns, etc.


at least someone agrees with the fact that its for coding support --_-- but anyways... i have C++ but for some reason its not working for me Confused every time i try to compile a test project it tells me the executable (.exe) cant be found 0_o... do i need to configure it or whats going on with it Confused

_________________
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Sun Apr 20, 2008 8:50 am    Post subject: Reply with quote

Flyte wrote:
I repeat:

Inject AntTweakBar

Also, even though Wiccaan has a great knowledge base for ring 3 programming, I don't think he has ventured into ring 0. How can he be an expert on windows if he has never done anything with the kernel? Confused


What I do on these forums and give support to others here doesn't show nearly as much as I do off-site of here. I admit I have little knowledge on ring 0 but I have messed with it some here and there on my spare time, read some articles, and have done research and know how the kernel works. I prefer to not touch it pragmatically because I dislike blue screening and having to wait for Windows to restart. Along with that, I have not needed to touch r0 level programming for anything I've done (except one project for fun) for protection, I have always found other methods to bypass things in r3.

Suggestion for you Flyte, don't jump to conclusions Wink

Edit: Oh, and AntTweakBar sucks in my opinion. Very limited to what it does and isn't anywhere near worth using to make an in-game GUI type thing with.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
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