Sign in to follow this  
iamspecial

meaning of this

Recommended Posts

It's a line of C or C++ code that declares a variable of type "HFONT", named "hFont". An HFONT is a type defined in the Windows API that is used as a handle to a font, so your code can specify which font it wants to use when rendering text or for other purposes.

Share this post


Link to post
Share on other sites
Where are you getting these lines from, here? I find it hard to believe that our line by line responses will explain it better than there, unless some kind soul writes you a mini essay on text rendering in OpenGL. My guess is that you still don't really understand what the lines of code are doing.

I have a feeling that instead of hitting Google with these lines, you are coming here first. Google should be your first port of call. If for some reason after Googling for a bit you find you are still unable to understand the code, then you come here. Include in your post evidence that you could not find the answers on Google.

Such a post might include phrases such as:
"I tried Googling with 'foo', all I got was This site (not a real link), which said this <include quote>, which I don't quite understand...".

This has a few advantages:

* Shows us that you are capable of independent learning. If you don't find out how to learn for yourself, you will always be dependant on others. In addition, most of us on Gamedev are happy to help those who are struggling, but not those who will not try for themselves.

* It will improve your Googling skills, which are vital if you are serious about programming.

* Who knows, you may find the answer. Probably faster than sitting waiting for some volunteer here to post a response.

In addition, forum etiquette includes not bumping your post, unless a long time has passed. If you need something to do while waiting for a response, try Google [smile].

For more information, read this.

Share this post


Link to post
Share on other sites
Everything rip-off said. This is a beginners forum not a beginners chat room. Additionally, we'd prefer it if you showed some initiative in your education; simply asking trivially searchable questions without any kind of background isn't sufficient.

Your questions suggest a relatively shallow amount of experience with C++ itself. Perhaps you might consider brushing up on the language basics before embarking into 3D graphics. The online e-books C++: A Dialog and Thinking in C++ are pretty good for that sort of thing.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this