It seems that both SystemInformation and VisualStyleRenderer provide wrong window caption height. For the default XP theme, the correct caption height is 30 (I captured a window and measured the caption height.). However, the caption height taken from SystemInformation.CaptionHeight is 26

while VisualStyleRenderer returns 29

. Below are my code snippets.
int captionHeight = SystemInformation.CaptionHeight;
and
using ( Graphics g = CreateGraphics() )
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Window.Caption.Active);
int captionHeight = renderer.GetPartSize(g, ThemeSizeType.True).Height;
}
I have to display unicode on the window caption bar regardless the system caption font and keep other elements unchanged. My question is: What is the secret place where Microsoft placed the correct caption height?
Thank you for viewing and/or answering!