RTL support in Windows

205 views
Skip to first unread message

Hamed Malek

unread,
Oct 15, 2007, 8:03:44 AM10/15/07
to wx-u...@lists.wxwidgets.org
Hello,
I am adding Right to Left support to an application (Audacity) in
Windows to be used in RTL languages. It seems using a Windows API
function named SetProcessDefaultLayout does reverse the application
direction but it has no effect on Dialog or Message boxes. MSDN says to
add RTL to dialog boxes, a flag should be added to the Dialog resource
file. but at least in Audacity no such resource file exists.

I saw that wxwidget has something named SetLayoutDirection for setting
layout direction, does this work in Windows too? how can I use it in my
app?

Thanks
Hamed

Julian Smart

unread,
Oct 15, 2007, 8:59:03 AM10/15/07
to wx-u...@lists.wxwidgets.org
Xu, Ming (NIH/NLM/NCBI) [F] wrote:
>
>
> hi,
>
> I can't install .Net 2003 on Vista so I installed MS VC++6.0 instead, but I got trouble to compile wxWidget 2.8.6 libs/dll.
> where I can find docs or description to compile wxWidget libs uisng MS VC++6.0 on Vista ?
>
There are no special instructions for compiling on Vista; I compiled
wxWidgets OK with VC++ 6 on Vista the last time I tried. See
docs\msw\install.txt. What problems did you have?

Regards,

Julian


Xu, Ming (NIH/NLM/NCBI) [F]

unread,
Oct 15, 2007, 8:45:05 AM10/15/07
to wx-u...@lists.wxwidgets.org

hi,

I can't install .Net 2003 on Vista so I installed MS VC++6.0 instead, but I got trouble to compile wxWidget 2.8.6 libs/dll.
where I can find docs or description to compile wxWidget libs uisng MS VC++6.0 on Vista ?

thanks

ming

winmail.dat

Vadim Zeitlin

unread,
Oct 15, 2007, 6:55:23 PM10/15/07
to wx-u...@lists.wxwidgets.org
On Mon, 15 Oct 2007 15:33:44 +0330 Hamed Malek <ha...@farsiweb.info> wrote:

HM> I am adding Right to Left support to an application (Audacity) in
HM> Windows to be used in RTL languages. It seems using a Windows API
HM> function named SetProcessDefaultLayout does reverse the application
HM> direction but it has no effect on Dialog or Message boxes. MSDN says to
HM> add RTL to dialog boxes, a flag should be added to the Dialog resource
HM> file. but at least in Audacity no such resource file exists.

Message boxes do get reversed, or at least are supposed to, see
src/msw/msgdlg.cpp (search for "RTL"). Does it work for you in e.g.
internat sample (if you run it in Arabic locale)?

As for the dialogs, they're not different from any other windows in wx so
I'm not sure why you should have problems with them. Or do you mean other
_standard_ dialogs (e.g. file open)?

HM> I saw that wxwidget has something named SetLayoutDirection for setting
HM> layout direction, does this work in Windows too? how can I use it in my
HM> app?

You should call wxTheApp->SetLayoutDirection(wxLayout_RightToLeft) and RTL
will be used by default in all windows.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/


Xu, Ming (NIH/NLM/NCBI) [E]

unread,
Oct 16, 2007, 12:31:10 AM10/16/07
to wx-u...@lists.wxwidgets.org
The error msg I got is
=======================================================================
--------------------Configuration: wxregex - Win32
Release--------------------
Creating ..\..\lib\vc_lib\msw\wx\setup.h
The system cannot find the path specified.
0 file(s) copied.
Error executing c:\windows\system32\cmd.exe.

wxregex.lib - 1 error(s), 0 warning(s)
========================================================================
====

Probably I didn't get permission setting correctly on Vista for making
dir at compiling.

ming

Regards,

Julian


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-u...@lists.wxwidgets.org
For additional commands, e-mail: wx-use...@lists.wxwidgets.org

YH Yang

unread,
Oct 16, 2007, 1:03:01 AM10/16/07
to wx-u...@lists.wxwidgets.org
Hi,

2007/10/16, Xu, Ming (NIH/NLM/NCBI) [E] <m...@ncbi.nlm.nih.gov>:
The error msg I got is
=======================================================================
--------------------Configuration: wxregex - Win32
Release--------------------
Creating ..\..\lib\vc_lib\msw\wx\setup.h
The system cannot find the path specified.
        0 file(s) copied.
Error executing c:\windows\system32\cmd.exe.

wxregex.lib - 1 error(s), 0 warning(s)
========================================================================
====

Probably I didn't get permission setting correctly on Vista for making
dir at compiling.

ming


This page may help you, http://www.wxwidgets.org/wiki/index.php/Microsoft_Visual_CPP_Guide
You need to configure your setup.h to build wxWidgets, and you can start from setup0.h.
(The simplest way is no change it but just copy&rename from setup0.h)

HTH
YH
Reply all
Reply to author
Forward
0 new messages