Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to dynamically change the order of Edit text

6 views
Skip to first unread message

harpreets...@gmail.com

unread,
Oct 1, 2007, 10:16:55 AM10/1/07
to
Hi

I have a edit text box on one of my dialogs. I want to dynamically
change the order of edit textbox depending on the language. i.e for
english it should be left to right aligned and for hebrew or arabic it
should be right to left.
I am using the following code but it is not working. Does anyone have
a idea about how to change the order.

if ((lExStyles & WS_EX_LAYOUTRTL) != WS_EX_LAYOUTRTL)
{
lExStyles |= WS_EX_LAYOUTRTL;

// Set extended styles to new value.
:: SetWindowLong(hWnd, GWL_EXSTYLE, lExStyles);
}

The above code checks if the edit box has WS_EX_LAYOUTRTL flag set, if
not then set it.

Thanks
Harpreet

0 new messages