The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: omer_akhter on August 04, 2006, 10:20:59 PM

Title: Help: Right to Left Window and Unicode Support
Post by: omer_akhter on August 04, 2006, 10:20:59 PM
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.


Waiting for reply

Thanks
Omer Akhter
Title: Re: Help: Right to Left Window and Unicode Support
Post by: hutch-- on August 05, 2006, 01:58:57 AM
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" ?
Title: Re: Help: Right to Left Window and Unicode Support
Post by: omer_akhter on August 05, 2006, 09:54:39 AM
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
Title: Re: Help: Right to Left Window and Unicode Support
Post by: omer_akhter on August 05, 2006, 02:07:13 PM
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
Title: Re: Help: Right to Left Window and Unicode Support
Post by: omer_akhter on August 07, 2006, 09:04:56 PM
Hello,

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

Thanks
Omer Akhter
Title: Re: Help: Right to Left Window and Unicode Support
Post by: ToutEnMasm on August 08, 2006, 05:40:00 AM
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


Title: Re: Help: Right to Left Window and Unicode Support
Post by: omer_akhter on August 08, 2006, 09:03:49 PM
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
Title: Re: Help: Right to Left Window and Unicode Support
Post by: Tedd on August 09, 2006, 10:00:45 AM
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
Title: Re: Help: Right to Left Window and Unicode Support
Post by: omer_akhter on August 09, 2006, 01:37:01 PM
Hello

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

Thanks Tedd
Omer Akhter