- RECT rc2 = { x, 0, GetSize().x, y };
- ::DrawText(hdc, label, label.length(), &rc2,
- DT_SINGLELINE | DT_VCENTER);
+ if ( !rtl )
+ {
+ RECT rc2 = { x, 0, x + width, y };
+ ::DrawText(hdc, label, label.length(), &rc2,
+ DT_SINGLELINE | DT_VCENTER);
+ }
+ else // RTL
+ {
+ RECT rc2 = { x, 0, x - width, y };
+ ::DrawText(hdc, label, label.length(), &rc2,
+ DT_SINGLELINE | DT_VCENTER | DT_RTLREADING);
+ }