Use
Code:
nHeight = -MulDiv(iTitleSize, GetDeviceCaps(hdc, LOGPIXELSY), 72);
hFont=CreateFont(nHeight,0,0,0,FW_BOLD,0,1,0,1,
OUT_DEFAULT_PRECIS,0,PROOF_QUALITY,0,FONT);
hSystemFont = SelectObject(hdc,hFont);
to create the font
Use
GetTextExtentPoint32(hdc, sTitle1,lstrlen(sTitle1), &Size);
and use the Size.cx and Size.cy to get the actual size of the string.
catch the system font returned from select object so when you are finished with the font you can call selectobject() to return the system font and deleteobject() the created one.