shell language
-
Hi, I want to write a program for Arabic language.But arabic is written from rigth to left.To set this property, I should set the WS_EX_RTLREADING ex-style.But in the msdn there is an information for this property like that: " If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the window text is displayed using Right to Left reading-order properties. For other languages, the style is ignored and not treated as an error. " When I set WS_EX_RTLREADING nothing changes.What is the meaning of shell language? If it is not Arabic how can I set the shell language to Arabic? I asked a similar question before but I couldn't get an answer. Thanks ibrahim
-
Hi, I want to write a program for Arabic language.But arabic is written from rigth to left.To set this property, I should set the WS_EX_RTLREADING ex-style.But in the msdn there is an information for this property like that: " If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the window text is displayed using Right to Left reading-order properties. For other languages, the style is ignored and not treated as an error. " When I set WS_EX_RTLREADING nothing changes.What is the meaning of shell language? If it is not Arabic how can I set the shell language to Arabic? I asked a similar question before but I couldn't get an answer. Thanks ibrahim
Did you set your system locale to Arabic? In order to do that, you have to install support for these languages (Regional and Language Settings -> Languages -> Install files for complex script and right-to-left languages). After that, go again to Regional and Language Settings -> Advanced -> Select a language to match...
-
Did you set your system locale to Arabic? In order to do that, you have to install support for these languages (Regional and Language Settings -> Languages -> Install files for complex script and right-to-left languages). After that, go again to Regional and Language Settings -> Advanced -> Select a language to match...
Yes,I did everything you said.But it is not working still.I want to change the language (so the writing order) at the runtime.I am writing this code can you check if it is right.Heye I want to change the writing order of an edit box;
CRect clientRect;
m_edit.GetWindowRect(clientRect);
ScreenToClient(clientRect);
SetWindowLong (m_edit.m_hWnd,
GWL_EXSTYLE,
GetWindowLong(m_edit.m_hWnd,GWL_EXSTYLE) & ~WS_EX_RTLREADING);
m_edit.SetWindowPos(&wndTop,clientRect.left,clientRect.top,clientRect.Width(),clientRect.Height(),SWP_SHOWWINDOW);Thanks, ibrahim
-
Yes,I did everything you said.But it is not working still.I want to change the language (so the writing order) at the runtime.I am writing this code can you check if it is right.Heye I want to change the writing order of an edit box;
CRect clientRect;
m_edit.GetWindowRect(clientRect);
ScreenToClient(clientRect);
SetWindowLong (m_edit.m_hWnd,
GWL_EXSTYLE,
GetWindowLong(m_edit.m_hWnd,GWL_EXSTYLE) & ~WS_EX_RTLREADING);
m_edit.SetWindowPos(&wndTop,clientRect.left,clientRect.top,clientRect.Width(),clientRect.Height(),SWP_SHOWWINDOW);Thanks, ibrahim
I think you also have to set the correct font and character set for your edit control. Something like this:
CFont fnt;
LOGFONT lf;
::ZeroMemory(&lf, sizeof(lf));
lf.lfHeight = 18;
lf.lfCharSet = ARABIC_CHARSET;
::lstrcpy(lf.lfFaceName, "System");
fnt.CreateFontIndirect(&lf);
GetDlgItem(IDC_EDIT)->SetFont(&fnt);
fnt.Detach();