Joris Huizer wrote: > A modified patch, taking hints into account from Huw Davies >
You need to select out the hfont before deleting it. So the SelectObject should look like hfont_old = SelectObject(hdc, hfont); then after the GetTextMetrics do DeleteObject(SelectObject(hdc, hfont_old)) (then you don't need the two sets of DeleteObject) Huw.