You have to set WS_EX_LAYOUTRTL flag back to 0
IF BITAND(OldLong, WS_EX_LAYOUTRTL) <> 0
SetWindowLong(ThisForm.HWnd,GWL_EXSTYLE, BITAND(BITXOR(OldLong,WS_EX_LAYOUTRTL),WS_EX_NOINHERITLAYOUT))
ENDIF
Please use PRE tag for code readability.
>I am the sing the following code for Right-To-Left to switch the form to Arabic, I what to add more flexibly to my system to be able to switch to Latin mode. so any one can help me to modify the following code the code as follows.
>
>*-- Define extended Windows styles
>#DEFINE GWL_EXSTYLE -20
>#DEFINE WS_EX_LAYOUTRTL 0x400000
>#DEFINE WS_EX_NOINHERITLAYOUT 0x100000
>*-- Define the Get window long API
>DECLARE INTEGER GetWindowLong IN user32;
>INTEGER hWnd, INTEGER nIndex
>*-- Define the Set window long API
>DECLARE INTEGER SetWindowLong IN user32;
>INTEGER hWnd, INTEGER nIndex, INTEGER dwNewLong
>*-- Get this form's current style.
>OldLong = GetWindowLong(ThisForm.HWnd, GWL_EXSTYLE)
>*-- Set the window extended style RTL non-inheritable.
>SetWindowLong(ThisForm.HWnd,GWL_EXSTYLE,;
>BITOR(OldLong,WS_EX_LAYOUTRTL,WS_EX_NOINHERITLAYOUT))
>
>
>
--sb--