In ListBoxX::GetDesiredRect, GDI (GetTextExtentPoint32) is always used to measure the text width. This should depend on the technology class member. If it is not SCWIN_TECH_GDI, then D2D should be used. This would be consistent with the code in ListBoxX::Draw. Right now the text is measure width GDI but drawn with D2D. The text width might be incorrect as D2D and GDI (may) use different text render implementations.
The text measurement implementation for D2D can be taken from SurfaceD2D::WidthText.
test is drawn with GDI, not D2D.
Correct. But the image is drawn with D2D. I think everything should be measured/drawn with D2D if the technlogy is set to D2D.
Using DirectWrite for drawing and measuring the text in lists would be reasonable.
Fixed in v5.5.6.