You can definitely get the height of a font using GetTextMetics.
Now it depends on the font characteristics and the designer of the font and as to whether he uses the entire height or only half of it for the actual bitmap.
Why Microsoft doing this?????
You should really be asked them.
«_Superman_» I love work. It gives me something to do between weekends.
The thing is not that simple. If you use MS WORD to have a test you will find it out. Using WORD to type some chars with normal characters and change font to "SimSun" and type a char. You will see that those "normal" characters were shifted a little bit downward.
The problem is how to find out what kind of font need to be shifted.
Yes, I see what you mean, but unfortunately I don't have an answer to why they do this. I guess you would need to ask Microsoft. You could take a look at the Fonts and Text[^] information on MSDN to see if that explains it.
MS did not document this (I might not find it out).
It is very hard to dig thing out from MSDN.
Sometimes yes, sometimes no; the best I can offer is the link in my previous message. You could also try Google as I know there are a number of independent websites around that deal with fonts in general.
I have a C++ project where I am reading data line by line from a text file in order to create a file header and store the records from the text file in a binary file.
The records will have a certain number of fields but you do not know how many fields until you've opened and read from the text file.
In Stock/Out of Stock (char)
Is there a way to create an empty struct and fill it later when you know the number of fields or is there some other structure besides a vector or array that will store records with different fields of different data types??
I tried to use the boost::any but i have to use linux to do the program and it sent me back a million error messages when i tried to compile it.
as for the struct i wish it was that easy. my problem is not knowing how many members there would be in the struct. the sample file i'm working with has those title, price, and in stock fields but for other files there could be more or less fields. if a struct was like a vector then i could declare it and then later just add the members when i know the fields.
i think i might just have to treat all the fields as strings and then create a vector to store them in...
Maybe you need to have those fields available in the struct, but default them to something like -1 when not in use. If it's something that may have multiple definitions, like the price, use vectors for that as well. Example:
Hi. Well.. I am developing a little game and a have this trouble. I want to make the window scroll by clicking and draging. It already works and works fine. But... My map is made of buttons and when i try to move the window by clicking and draging at the buttons positions main window doesn't recive ON_WM_MOUSEMOVE signal. So how can i make my application to generate ON_WM_MOUSEMOVE when i am clicking buttons? Tnx for help.