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 


Font of Static text

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

Joined: 20 Apr 2007
Posts: 668

PostPosted: Wed Apr 30, 2008 4:24 am    Post subject: Font of Static text Reply with quote

I've started at some simple gui creation using "CreateWindow()" function, and im wondering, if it is possible to change the font of the text, that is created when you make a "CreateWindow('static',...)"?

did i say, that it was in C++?
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

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

PostPosted: Wed Apr 30, 2008 5:17 am    Post subject: Reply with quote

CreateFont() and SelectObject()

http://msdn.microsoft.com/en-us/library/ms534214.aspx
http://msdn.microsoft.com/en-us/library/ms533272(VS.85).aspx
Back to top
View user's profile Send private message MSN Messenger
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Wed Apr 30, 2008 5:23 am    Post subject: Reply with quote

This is my code.

HFONT hfFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);

The default font will be better looking than SYSTEM for the rest of the APP

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

Joined: 20 Apr 2007
Posts: 668

PostPosted: Wed Apr 30, 2008 5:27 am    Post subject: Reply with quote

And if i wish to change the size of my font?
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Wed Apr 30, 2008 6:28 am    Post subject: Reply with quote

HFONT CreateFont(
int nHeight,
int nWidth,
int nEscapement,
int nOrientation,
int fnWeight,
DWORD fdwItalic,
DWORD fdwUnderline,
DWORD fdwStrikeOut,
DWORD fdwCharSet,
DWORD fdwOutputPrecision,
DWORD fdwClipPrecision,
DWORD fdwQuality,
DWORD fdwPitchAndFamily,
LPCTSTR lpszFace
);
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Wed Apr 30, 2008 6:33 am    Post subject: Reply with quote

Symbol wrote:
HFONT CreateFont(
int nHeight,
int nWidth,
int nEscapement,
int nOrientation,
int fnWeight,
DWORD fdwItalic,
DWORD fdwUnderline,
DWORD fdwStrikeOut,
DWORD fdwCharSet,
DWORD fdwOutputPrecision,
DWORD fdwClipPrecision,
DWORD fdwQuality,
DWORD fdwPitchAndFamily,
LPCTSTR lpszFace
);


Of curse..., but when applying it as HFONT, will it then change all the fonts in my project?
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Wed Apr 30, 2008 7:24 am    Post subject: Reply with quote

Creating the font only gives the font handle to a certain HFONT. Whether it changes the font on certain objects is your job.

sending the WM_SETFONT Message with the wParam being (WPARAM)hFont (or w/e you named the handle to the font) will set the font on a certain hWnd Object.

_________________
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