Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. shell language

shell language

Scheduled Pinned Locked Moved C / C++ / MFC
questionlinuxhelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    iayd
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • I iayd

      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

      M Offline
      M Offline
      Michael Schubert
      wrote on last edited by
      #2

      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...

      I 1 Reply Last reply
      0
      • M Michael Schubert

        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...

        I Offline
        I Offline
        iayd
        wrote on last edited by
        #3

        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

        M 1 Reply Last reply
        0
        • I iayd

          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

          M Offline
          M Offline
          Michael Schubert
          wrote on last edited by
          #4

          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();

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups