Archived

This topic is now archived and is closed to further replies.

Prince_Willis

Newbie needs help with game problem

Recommended Posts

Prince_Willis    122
Alright..... I''ve just started working on a pong type game as my first project in the world of game developing. Everything was comming along just fine until i decided to make custom fonts for my "title screen". Everytime i want a custom font, i''ve been using something like this: SelectObject(hdc,CreateFont(75,60,0,26,25,0,0,0,0,0,0,0,0,"Courier New")); Now, after adding a couple of lines like this, everytime i close my game, my system resources are at 9%, and everything is all wacky. I''m really bummed out about this being that the game was comming along so well. If anyone can help i would be eternally greatful. Thanks in advance, Will

Share this post


Link to post
Share on other sites
Gindew    122
I believe you need to delete your font when you''re finished with it.

HFONT hMyFont = CreateFont(...);
SelectObject(hdc,hMyFont);
...
// use your font here
...
DeleteObject(hMyFont); // when you''re done with it

"No army has ever marched into battle thinking the Creator had sided with their enemy." - Terry Goodkind

Share this post


Link to post
Share on other sites