News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Help: Right to Left Window and Unicode Support

Started by omer_akhter, August 04, 2006, 10:20:59 PM

Previous topic - Next topic

omer_akhter

Hello

I am new to assembly language. Working on a project of creating an editor for my language (Urdu - Asian Language) which is written right to left. I need help in this regard.


  • I need to know how would I create the application to be right to left.
  • and how would get the application to be unicode basically. Becoz I would need to switch between english and urdu

Waiting for reply

Thanks
Omer Akhter

hutch--

Hi Omer,

Welcome on board. I think what you are after can be done with a rich edit control as the support for right to left versions is built into your Windows version. It is seen in arabic, hebrew and a few other Windows versions. You will have to check the reference material but to support unicode, as long as your windows version is late enough, win2000 and later, it should support unicode so you just select the function that has a trailing "W" rather than a trailing "A" after its name and you will come close to what you want to do.

As far as switching back and forth to English and Urdu, I think you will have to have two versions of the rich edit control and display the one you require depending on the language you are going to display.

An unrelated question, from classic literature we hear the name "Omar", is it the same name as "Omer" ?
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

omer_akhter

Hello,

Thank you very much for replying but with with W versions of functions, do we have the structures (like WNDCLASSEX) with W or they use the same version of structures. Also I have heard of declaring some constant to enable unicode at the start of program?? When used W versions of functions, my application name on title bar was changed to boxes??

And for the rich text box, I want the same rich text box to have both languages. I want the keyboard messages to be intercepted in the message loop, on some condition. If the condition is true, the keybord message should be intercepted and it should replace its code with the unicode of the character I want.

"Omer" I think is the same as "Omar", I write it like this since learned it like this the very first time I learned writing. People around me write it as "Umar".


Thanks
Omer Akhter

omer_akhter

hi,

I have another problem, I have used the window styles, WS_EX_LAYOUTRTL and WS_EX_RTLREADING for both window and richtextbox but it doesnt work?? why??

I m using windows XP professional

Thanks
Omer Akhter

omer_akhter

Hello,

Can somebody help me with right to left windows and comtrols :( :'(?? How to do that??

Thanks
Omer Akhter

ToutEnMasm

Hello,
First , you have to donwload the SDK,it's the only documentation that can answer.
Second ,search for sites in this language or others languages with the same problem.

The richedit control has some styles for those languages (right to left),study this control is a good start to solve the problem.
                         ToutEnMasm



omer_akhter

Hello,

Thanks for reply but I have already downloaded the SDK and have been studying it for about 4 days.

I dont know why the style doesnt work in the call CreateWindowEx

invoke CreateWindowExW, WS_EX_CLIENTEDGE \
, addr WndClassName \
, addr TitleText \
, WS_EX_APPWINDOW or WS_EX_RTLREADING or LAYOUT_RTL or\
WS_OVERLAPPEDWINDOW \
, CW_USEDEFAULT \
, CW_USEDEFAULT \
, 600 \
, 400 \
, NULL \
, NULL \
, hInst \
, NULL


but it something else worked a little

invoke SetProcessDefaultLayout, LAYOUT_RTL

This mirrors everything but the text :'(

The text is still painted from left to right in the title bar :snooty:

Waiting for some hint

Thanks
Omer Akhter

Tedd

One mistake - styles named "WS_EX_" should be in the first parameter (with WS_EX_CLIENTEDGE), not along with the other 'normal' styles :wink
But I can't test this, so I don't know if that will actually solve your problem.
I did find a few articles on http://msdn.microsoft.com/library/ by searching for "right-to-left window" -- see if there's any help there :U
No snowflake in an avalanche feels responsible.

omer_akhter

Hello

O my ...............  :eek What a blunder have i been doing.

Thanks Tedd
Omer Akhter