RASHAD wrote:You know I have some experience with RTL
Hehe, I figured
May I ask if it would be a big deal if someone's application (a skinning engine, to be precise) does not fully support the RTL layout?
I always thought that Windows, with an installed Arabic language pack, would automatically mirror the window with its controls. But after some testing on a virtual machine I realized that this isn't the case. And the worst part is that some GDI functions are not mirrored in the same way as on an LTR layout.
So far I have 3 major problems: 1) The definition of different left and right margin sizes with WM_NCCALCSIZE does not work as expected. 2) Drawing an image background brush with changed origin within WM_CTLCOLORBTN or WM_CTLCOLORSTATIC seems to work only with some controls and 3) the mentioned problem with image backgrounds (from this thread). With No. 2 + 3 I might be able to get away with a workaround, but for the first problem I have no idea how to even solve that.
And here's the thing... Is it really worth it? I mean, is it absolutely necessary to support the RTL layout (e. g. in Egypt)? Or are most of the applications LTR anyway and nobody actually cares about RTL?
It would be very nice if you could shed some light on the matter, THX
BTW, I found a workaround for the 3rd problem, but this "fix" is introducing some new minor problems ofc (toolbar, statusbar)
Code: Select all
Case #WM_ERASEBKGND
GetClientRect_(hWnd, cRect.RECT)
If GetLayout_(wParam)
SetBrushOrgEx_(wParam, cRect\right, 0, 0)
EndIf
FillRect_(wParam, cRect, brush)
ProcedureReturn 1
[/size]