General font information:
What you are looking for is how to normalize text placement to the "baseline" or the "origin" (same concept). You can do this with the ascent (ascender) or descent (descender) depending on your coordinate system.
http://www.freetype.org/freetype2/docs/tutorial/step2.html
That provides a pretty good set of example images related to typography.
General bitmap font information:
Now, with regards to a bitmap image the easiest way to make sure they are all lined up properly is to have the same height for each character's bitmap representation in your sprite sheet (widths should be different however based on the actual character width). If you do this, then you can simply line everything up based on that shared height.
If you are clipping the excess whitespace around a character however, you will need to store the clipped values in some structure along with the glyph so that you can determine the offset. If an API is doing this for you, they will likely have ascender/descender, origin/baseline, or line-height type method where you can get the full dimensions based on a character so you can do this properly.
Api specific information
Edit: Based on other answers here are the relevant links for your API specific question:
GetTextMetrics:
http://msdn.microsoft.com/en-us/library/dd144941(v=vs.85).aspx
TEXTMETRIC struct:
http://msdn.microsoft.com/en-us/library/dd145132(v=vs.85).aspx
tmAscent or tmDescent can be used to help offset your y coordinate.