GetTextMetrics()
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
I use
m_edit.GetDC()->GetTextMetrics(&tm)
to determine current font height. Then i call m_edit.SetFont(&myfont) but GetTextMetrics(&tm) returns old values. How to update DC object?Without seeing more of your code it's hard to say. Please note that each and every call to
GetDC()
must have a corresponding call toReleaseDC()
. Since you are not saving the return fromGetDC()
, your code is not releasing the DC properly. HPS HwndSpy - GUI developer's aid to visually locate and inspect windows. For the month of August only, use coupon code CP-81239 for 30% off.