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 automatically install a font from an app?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Hieroglyphics
I post too much
Reputation: 0

Joined: 06 Dec 2007
Posts: 2007
Location: Your bedroom

PostPosted: Sun Oct 12, 2008 3:46 pm    Post subject: How to automatically install a font from an app? Reply with quote

Ok here is my trainer:


Notice I don't use an everyday font, so since it is a dll. I am going to make an exe to load it anyways. Is there any way to make the app automatically install the font if I include it in the .rar?

_________________

Back to top
View user's profile Send private message AIM Address MSN Messenger
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Sun Oct 12, 2008 3:49 pm    Post subject: Reply with quote

should load it if it's in the same directory. I think.
Back to top
View user's profile Send private message MSN Messenger
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Sun Oct 12, 2008 4:49 pm    Post subject: Reply with quote

AddFontResource/AddFontResourceEx
Back to top
View user's profile Send private message
Hieroglyphics
I post too much
Reputation: 0

Joined: 06 Dec 2007
Posts: 2007
Location: Your bedroom

PostPosted: Sun Oct 12, 2008 6:48 pm    Post subject: Reply with quote

SO:

Code:
int AddFontResourceEx(fontname,FR_PRIVATE,0);


or

Code:
int AddFontResource(fontname);


like that? do I have to ad the extension also?

_________________

Back to top
View user's profile Send private message AIM Address MSN Messenger
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sun Oct 12, 2008 8:00 pm    Post subject: Reply with quote

Add it to your resources so you can dynamically load it.
Back to top
View user's profile Send private message
Hieroglyphics
I post too much
Reputation: 0

Joined: 06 Dec 2007
Posts: 2007
Location: Your bedroom

PostPosted: Sun Oct 12, 2008 11:17 pm    Post subject: Reply with quote

So like #include <fontname.ttf>

?

then like

int AddFontResource(fontname.ttf);

_________________

Back to top
View user's profile Send private message AIM Address MSN Messenger
Wintermoot
Expert Cheater
Reputation: 0

Joined: 08 Nov 2007
Posts: 198

PostPosted: Mon Oct 13, 2008 1:35 am    Post subject: Reply with quote

He said resources. Not includes.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Mon Oct 13, 2008 8:38 am    Post subject: Reply with quote

Hieroglyphics wrote:
So like #include <fontname.ttf>

?

then like

int AddFontResource(fontname.ttf);


omfg... /facepalm

Go Learn C++ please.

_________________
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Mon Oct 13, 2008 9:27 am    Post subject: Reply with quote

What he means by resources is that you add the font file as a resource, meaning in a .rc file for example (the .rc will compile into a .res).
Then you can use resourcefunctions (LoadResource etc) to load it into memory and then write it to a file. Google something like 'extract resources from exe' and you'll find examples.
This way the font file is bundled in the exe and you don't have to add it as a seperate file to your rar archive.

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

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Mon Oct 13, 2008 10:03 am    Post subject: Reply with quote

Does anyone find it ironic that the man who runs "hLibrary, All you need to know about programming and hacking" and claims to have a trainer can't even write a C++ statement.

Anyways, you could always *dynamically* find the font folder in system and move the .tff or w/e to it.

_________________
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Mon Oct 13, 2008 10:33 am    Post subject: Reply with quote

I know how to make resources for vb not vc.

But in vb u open resource edit and add it then u use the loadresource functions to load and edit the resources.
Back to top
View user's profile Send private message
Fuzz
Grandmaster Cheater
Reputation: 0

Joined: 12 Nov 2006
Posts: 531

PostPosted: Mon Oct 13, 2008 10:57 am    Post subject: Reply with quote

Hieroglyphics wrote:
So like #include <fontname.ttf>

?

then like

int AddFontResource(fontname.ttf);


Oh my god, are you fucking serious?

_________________
Back to top
View user's profile Send private message AIM Address
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Mon Oct 13, 2008 10:59 am    Post subject: Reply with quote

Fuzz wrote:
Hieroglyphics wrote:
So like #include <fontname.ttf>

?

then like

int AddFontResource(fontname.ttf);


Oh my god, are you fucking serious?

I think so...

I have no idea how to do this but i read some msdn and this is what I can think of:
Since I suck at C++ Ill do it in delphi

AddFontResource(GetCurrentDir + '\fontname.ttf');

try something like this. put your font tff file in the same folder as your exe and name it fontname.tff.
Back to top
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Mon Oct 13, 2008 11:28 am    Post subject: Reply with quote

dnsi0 wrote:
Fuzz wrote:
Hieroglyphics wrote:
So like #include <fontname.ttf>

?

then like

int AddFontResource(fontname.ttf);


Oh my god, are you fucking serious?

I think so...

I have no idea how to do this but i read some msdn and this is what I can think of:
Since I suck at C++ Ill do it in delphi

AddFontResource(GetCurrentDir + '\fontname.ttf');

try something like this. put your font tff file in the same folder as your exe and name it fontname.tff.


Then in C++...

Code:
   char FontPath [MAX_PATH];
   GetCurrentDirectory (MAX_PATH,FontPath);
   sprintf (FontPath,"%s%s",FontPath,"\\fontname.ttf");
   AddFontResource (FontPath);

_________________
Back to top
View user's profile Send private message Send e-mail
HolyBlah
Master Cheater
Reputation: 2

Joined: 24 Aug 2007
Posts: 446

PostPosted: Mon Oct 13, 2008 1:32 pm    Post subject: Reply with quote

Start here http://www.cplusplus.com/doc/tutorial/
Then here http://www.xtremevbtalk.com/showpost.php?p=1088597&postcount=2
Then http://msdn.microsoft.com/en-us/library/ms534231(VS.85).aspx
or http://msdn.microsoft.com/en-us/library/ms533937(VS.85).aspx
Now start to think and combine this all together.
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